FILE * file = fopen(filestring.c_str(), "r");
if(file == NULL)
cout << "WUPSY" << endl;
fseek(file, 0, SEEK_END);
long size = ftell(file);
fseek(file, 0, SEEK_SET);
char * cbuf = new char[size+1];
fread(cbuf, 1, size, file);
cbuf[size] = '\0';
fclose(file);
string result(cbuf);
cout << "yy" << result << "yy\n";
delete [] cbuf; |