大家好,
事情是这样的,我最近在写一字符串题,发现string 竟然不会下标越界? (?)
此程序不会报错,会输出0
int main(){ string a="abcd", b="b"; if(a[-1]==b[100]){ cout<<1; } else{ cout<<0; } }