编译通过了,但是别人说这样不行,我该如何修改?
有两种方法,第一种是使用STL中的vector模板,vectorc(n)还有一种方法是char *c=new char 【n】
char *c=new char[n];