请教一个错误:void value not ignored as it ought to be
用GCC编译出现如下错误:
test9.c:17: void value not ignored as it ought to be
程序是关于流的IO操作,代码如下:
........
FILE *stream;
if((stream=fopen("test","r"))==(FILE*)0)
{
fprintf(stderr,"error opening file.\n");
exit(1);
}
if((setlinebuf(stream))!=0) //出错误的行
{
fprintf(stderr,"error setlinebuffer.\n");
exit(1)
}
..........
出错的意思好像是说setlinebuf不该加参数stream?弄不明白.....
请各位指点迷津!!