码迷,mamicode.com
首页 > 编程语言 > 详细

Linux下编译C++出现的错误

时间:2020-04-20 13:34:20      阅读:129      评论:0      收藏:0      [点我收藏+]

标签:编译   系统   size_t   nbsp   ror   size   没有   this   was   

1.error: ‘strlen’ was not declared in this scope

方案:#include<cstring>//**<string.h>是不包括strlen的,要使用cstring**

 

2.error: size_t has not been declared
据说这是因为在Linux系统下g++没有C++的size_t
方案:需要在需要到size_t的文件中加入头文件 stdlib.h   问题就解决了

Linux下编译C++出现的错误

标签:编译   系统   size_t   nbsp   ror   size   没有   this   was   

原文地址:https://www.cnblogs.com/stonemjl/p/12735766.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!