【GCC调试程序C语言问题】error: initializer-string for array of chars is too long [-fpermissive]

来源:互联网 发布:数据员每天工作内容 编辑:程序博客网 时间:2024/05/08 10:39

环境:系统Ubuntu 15.10/ 编译器GCC/语言C

【1】error: initializer-string for array of chars is too long [-fpermissive]


字符数组初始化时,数组大小一定要大于字符串长度+1,否则编译错误。

字符串数组最后有\0。

http://blog.csdn.net/zcsylj/article/details/7389534

0 0