char ch[10] = {0}; // 或者 #include <cstring> char ch[10]; memset(ch, 0, sizeof(ch) * 10);
数组下标从0开始,i=1就行了 用的时候用ch[i-1]