[ create a new paste ] login | about

Link: http://codepad.org/ibSc1C0D    [ raw code | output | fork ]

C++, pasted on Aug 17:
1
2
3
4
5
6
7
8
9
10
11
char * sendfile = "C:\\STOL.jpg";
FILE *fin;
fin = fopen(sendfile, "rb");
long size;
fseek(fin, 0, SEEK_END);
size = ftell(fin);
fseek(fin, 0, SEEK_SET);
char * buf=(char *)malloc(size);
fread(buf,size,100500,fin);
fclose(fin);
cout << buf;


Output:
1
2
3
4
cc1plus: warnings being treated as errors
Line 1: warning: deprecated conversion from string constant to 'char*''
Line 3: error: expected constructor, destructor, or type conversion before '=' token
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: