bug:error:too few arguments to function ‘fopen’
2014-09-04 13:47
246 查看
#define File_Path "cpu_usepercentage_file.txt";
void open_file(){
CPU_UsePercentage_File = fopen(File_Path,"ab");
if(CPU_UsePercentage_File == NULL){
printf("open CPU_UsePercentage_File error.\n");
exit(0);
}
}
报错:
CPUUsePercentage.c:40:33: error: expected ‘)’ before ‘;’ token
CPUUsePercentage.c:40:33: error: too few arguments to function ‘fopen’
原来是因为define后面错用了分号
#define File_Path "cpu_usepercentage_file.txt";
void open_file(){
CPU_UsePercentage_File = fopen(File_Path,"ab");
if(CPU_UsePercentage_File == NULL){
printf("open CPU_UsePercentage_File error.\n");
exit(0);
}
}
报错:
CPUUsePercentage.c:40:33: error: expected ‘)’ before ‘;’ token
CPUUsePercentage.c:40:33: error: too few arguments to function ‘fopen’
原来是因为define后面错用了分号
相关文章推荐
- caffe 与cudnn版本不匹配 ./include/caffe/util/cudnn.hpp:127:41: error: too few arguments to function
- fuse_trash.c:119: error: too few arguments to function 'hdfsDelete'
- 手动编译memcached时遇到memcache.c error: too few arguments to function ‘zend_list_insert’的解决方法
- nginx-sticky-module-1.1//ngx_http_sticky_misc.c:281:2: error: too few arguments to function
- cudnn.hpp:127:41: error: too few arguments to function ‘cudnnStatus_t cudnnSetPooling2dDescriptor
- c++引用标准c库close出错 error: too many arguments to function call, expected 0, have 1
- IAR编译出错:Error[Pe165]: too few arguments in function call
- vmware tools 安装不上,报错/tmp/modconfig-IgPiI7/vmhgfs-only/filesystem.c:685: error: too few arguments to
- yaffs2 源码错误 too few arguments to function 'yaffs_flush_file' 2014.08.22
- Discuz7.2 BUG :"Warning: sprintf() [function.sprintf]: Too few arguments in xxxxxxxx/include/discuzcode.func.php on line 369"
- uvc_v4l2_ioctl.h 提示出错 too few arguments to function ‘v4l_printk_ioctl’
- /usr/src/php-5.4.6/ext/gd/gd.c:1582: error: too many arguments to function ;zend_list_insert‘
- vmware 共享文件夹配置及 error: too many arguments to function ‘wait_on_bit’ 解决方法
- iOS-Bug: objc_msgSend 报错Too many arguments to function call, expected 0, have 3
- objc_msgSend()报错Too many arguments to function call ,expected 0,have3
- ios学习笔记(3)——objc_msgSend()报错Too many arguments to function call ,expected 0,have3解决方法
- xcode6 使用MJRefresh,Too many arguments to function call, expected 0, have *
- Xcode6.1使用MJRefresh、SDWebImage,Too many arguments to function call, expected 0, have *
- Too many arguments to function call
- 使用SDWebImage时 报错Too many arguments to function call, expected 0, have *