早教吧 育儿知识 作业答案 考试题库 百科 知识分享

为什么会出现errorC2015:toomanycharactersinconstantif(g==1)strcpy(geshu[i].danwei,'计算机');if(g==2)strcpy(geshu[i].danwei,'电气');if(g==3)strcpy(geshu[i].danwei,'冶金');if(g==4)strcpy(geshu[i].danwei,'包材');if(g==5)strcpy(g

题目详情
为什么会出现 error C2015:too many characters in constant
if(g==1) strcpy(geshu[i].danwei,'计算机');
if(g==2) strcpy(geshu[i].danwei,'电气');
if(g==3) strcpy(geshu[i].danwei,'冶金');
if(g==4) strcpy(geshu[i].danwei,'包材');
if(g==5) strcpy(geshu[i].danwei,'机械');
if(g==6) strcpy(geshu[i].danwei,'土木');
if(g==7) strcpy(geshu[i].danwei,'理学');
▼优质解答
答案和解析
字符串要用双引号括起来,而不是单引号,都改成双引号再编译看看,还不行再问吧,