#include<iostream>
using namespace std;
int main()
{
char *temp[100]={"你好","我好","大家好","good","better","very good"};
for(int i=0;i<8;i++)
cout<<temp[i]<<endl;
}
运行结果:
小编测试了一下char *temp[ ]的长度要大于等于8,即至少为char *temp[8],如果为char *temp[7],运行就会自动关闭程序,出现下图情况,这里很疑惑
希望大家能够留言一起讨论一下哈!