c – char的初始化值过多[9] [9]

前端之家收集整理的这篇文章主要介绍了c – char的初始化值过多[9] [9]前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
但事实是,我宣布的char数组中正好是初始化器的量.
char dash[9][9]={
        {"1","2","3","4","5","6","7","8","9"},{"a","b","c","d","e","f","g","h","i"},{"q","w","r","t","y","u","i","o"},{"9","1"},{"i","a"},{"o","q"},{"z","x","v","s","r"},"l","a","p","y"},{"m","o","n","i"}
    };

有九排九列.我的问题是什么我检查了其他论坛,这个答案,但没有发现任何帮助.

解决方法

您使用字符串而不是字符来初始化数组,因此每个元素都试图适应char和一个空终止符.尝试’1′,’2′,’3’等
原文链接:https://www.f2er.com/c/114435.html

猜你在找的C&C++相关文章