记录编程遇到的错误

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语言中,定义一个指针变量时,系统不会像在定义基本数据类型一样自动为指针分配地址空间的,所以我们在定义指针变量时要手动为它分配一个地址空间

参考:https://yq.aliyun.com/articles/649819

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值