1.Error:‘intptr_t’ was not declared in this scope
a.adds #include <stdint.h>
未解决
b.intptr_t等在io.h中定义,在Linux下本来就没有<io>,所以不可用。Linux下#include <dirent.h>实现遍历目录。
参考:https://blog.csdn.net/xiexingshishu/article/details/42886885
2.Error: 'system' was not declared in this scope
方法:#include <cstdlib>
参考:https://blog.csdn.net/hhduyc/article/details/84084915
3.Error: passing ‘const ofstream {aka const std::basic_ofstream<char>}’ as ‘this’ argument discards qualifiers [-fpermissive]
方法:去掉const限制
4.linux下输入路径:
//home//wangsuwei//data//DUTS//DUTS//DUTS-TE//DUTS-TE-Image//
/home/wangsuwei/data/DUTS/DUTS/DUTS-TE/DUTS-TE-Image/
5.Error: segmentation fault (core dumped)
在C语言中,定义一个指针变量时,系统不会像在定义基本数据类型一样自动为指针分配地址空间的,所以我们在定义指针变量时要手动为它分配一个地址空间