小编Its*_*lia的帖子

c语言:fwrite什么都不做

{
FILE* f1 = fopen("C:\\num1.bin", "wb+");//it will create a new file 
int A[] = { 1,3,6,28 }; //int arr
fwrite(A, sizeof(A), 1, f1); //should insert the A array to the file
}
Run Code Online (Sandbox Code Playgroud)

我确实看到了文件但是即使在fwrite之后,文件仍然是空的(0字节)有没有人知道为什么?

c fwrite

2
推荐指数
2
解决办法
268
查看次数

标签 统计

c ×1

fwrite ×1