c语言程序设计中出现too many initializers,怎么解决
的有关信息介绍如下:问题补充说明:编译c程序char str1[]={"零","壹","贰","叁","肆","伍","陆","柒","捌","玖"};出现C:\Documents and Settings\Administrator\Cpp1.cpp(5) : error C2078: too many initializers
因为str1[]只是一个字符串数组,而你对其给它赋了很多初始值,并且是字符串型的,所以会出现toomanyinitializers,定义一个字符串指针数组就可以解决,改正后为:char*str1[]={"零","壹","贰","叁","肆","伍","陆","柒","捌","玖"};
版权声明:文章由 大问百书 整理收集,来源于互联网或者用户投稿,如有侵权,请联系我们,我们会立即处理。如转载请保留本文链接:https://www.dawenbaishu.com/life/65957.html