Why is fwrite writing more than I tell it to?

前端 未结 4 710
无人及你
无人及你 2020-12-18 21:21
FILE *out=fopen64(\"text.txt\",\"w+\");
unsigned int write;
char *outbuf=new char[write];
//fill outbuf
printf(\"%i\\n\",ftello64(out));
fwrite(outbuf,sizeof(char),w         


        
4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-18 22:17

    Interesting. Works fine on Windows VC++, albeit ftello64 replaced with ftell.

提交回复
热议问题