network print

This commit is contained in:
Francesco Gatti
2017-08-08 14:59:25 +02:00
parent 7d570c0df4
commit 0a9957ba18
6 changed files with 69 additions and 2 deletions
+12
View File
@@ -1,4 +1,16 @@
#include "utils.h"
#include <string.h>
void printCenteredTitle(const char *title, char fill, int dim) {
int len = strlen(title);
int first = dim/2 + len/2;
std::cout.width(first); std::cout.fill(fill); std::cout<<std::right<<title;
std::cout.width(dim - first); std::cout<<"\n";
std::cout.fill(' ');
}
void readBinaryFile(const char* fname, int size, value_type** data_h, value_type** data_d, int seek)
{