关于c++的char数组的问题
#include<iostream>#include<cstring>
#include<string>
using namespace std;
int main()
{
const char ch[] = { "ling","yi","er","san","si","wu","liu","qi","ba","jiu" };
return 0;
}
为什么这里不能用char ch={ "ling","yi","er","san","si","wu","liu","qi","ba","jiu" };
应该不是const的问题. const char *ch={ "ling","yi","er","san","si","wu","liu","qi","ba","jiu" };
页:
[1]