非法字符?我明明和答案一样啊
我明明和答案一样,为什么说有非法字符 #include
#includeusing namespace std; int main(void) { //在堆中申请100个char类型的内存 char *str = new char[100]; strcpy(str, "Hello imooc"); cout << str << endl; //释放内存 delete []str; str=NULL; system("pause"); return 0; }我明明和答案一样,为什么说有非法字符 #include
#includeusing namespace std; int main(void) { //在堆中申请100个char类型的内存 char *str = new char[100]; strcpy(str, "Hello imooc"); cout << str << endl; //释放内存 delete []str; str=NULL; system("pause"); return 0; }2016-01-13
举报