switch(sum) { case 0: int Z[7]={0,0,0,0,0,0,0}; break; case 1: int Z[7]={0,0,0,0,0,0,1}; break; case 2: int Z[7]={0,0,1,0,0,0,0}; break; case 3: int Z[7]={0,0,0,1,0,0,0}; break; }
问题 显示 :
作业.cpp E:\程序\作业.cpp(34) : error C2360: initialization of 'Z' is skipped by 'case' label E:\程序\作业.cpp(32) : see declaration of 'Z' E:\程序\作业.cpp(42) : error C2360: initialization of 'Z' is skipped by 'case' label E:\程序\作业.cpp(32) : see declaration of 'Z' E:\程序\作业.cpp(50) : error C2360: initialization of 'Z' is skipped by 'case' label E:\程序\作业.cpp(32) : see declaration of 'Z' E:\程序\作业.cpp(51) : error C2374: 'Z' : redefinition; multiple initialization E:\程序\作业.cpp(32) : see declaration of 'Z' Error executing cl.exe.
不知道 是什么原因啊???
[此贴子已经被作者于2004-10-06 23:37:32编辑过]