我已经运行在用Borland C下面的代码并得到了以下错误:在fprintf中:错误故障访问冲突地址0x000000处,读地址为0x00
Thread stopped. j:\bc5\bin\file\pro001.exe:fault access violation at
0x4043cc : read of address 0x12.
#include <stdio.h>
#include <stdlib.h>
main()
{
FILE *fp;
fp=fopen ("C:\Users\MEYSAM\Desktop\1.txt","w+");
fprintf (fp,"This is testing for fprintf ...\n");
fputs ("that is output filename by reference.",m);
fclose (fp);
}
检查'(fp == NULL)'是否失败并且试图从'fp'读取失败.. –
什么是'm'?它在哪里定义? –
我认为\应该被转义为\\ – Danh