大佬们 这个文检操作的程序是什么原因编译不通过呢 求指点
#include<stdio.h>#include<stdlib.h>
#include<string.h>
int main(void)
{
int i = 0;
FILE *fp = NULL;
char *filename = "c:/2.txt";
char a[30] = "adfhgiohgoihg";
fp = fopen(filename, "r+");
if(fp == NULL)
{
printf("func fopen()err\n");
return ;
}
printf("打开文件成功\n");
for(i=0; i<strlen(a); i++)
{
fputc(a[i],fp);
}
fclose(fp);
system("pause");
return 0;
}
//错误提示信息
//[Error] return-statement with no value, in function returning 'int' [-fpermissive]