error: array subscript is not an integer 在C语言编译中出现的问题提示,是什么意思 guandahai02020.12.08浏览374次其他分享举报 guandahai0 采纳率:54% 等级:8 已帮助:112人 私信TA向TA提问 1个回答 xccy2744 2020.12.09 xccy2744 采纳率:46% 等级:9 已帮助:711人 私信TA向TA提问满
{scanf("%s%c",str,&ch);len=strlen[str];if(len>maxx){maxx=len;strcpy(longestStr,str);}if(len<minn){minn=len;strcpy(shortestStr,str);}}printf("%s\n%s\n",longestStr,shortestStr);return 0;}在去掉和 异能力者 6 在len=strlen[str];弹出了array subscript is not an integer的报错,但...
class Integer{ public: int a; Integer(int aa):a(aa){} }; Integer a(1),b(2); cout<<a+b; //因为系统的+运算没有对自定义的类的运算方法 建议: 1.自己对+运算符进行运算符重载,,如: class Integer{ public: int a; Integer(int aa):a(aa){} friend const Integer operator+ (const In...