65,187
社区成员




#include <iostream>
using namespace std;
int main()
{
int n=0;
char ch1[10];
char ch2[]="一二三四";
char ch3[]="abcd";
char * stemp[]={ch1,ch2,ch3};
while(*stemp[2]!=NULL)
{
cout<<*stemp[2]++<<endl;
n=n+1;
}
cout<<n<<endl;
return 0;
}
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
char * szTemp[]={"一","一二","一二三"};
cout <<szTemp[0] <<endl <<szTemp[1] <<endl;//这样可以正常输出字符串:一 和 一二
cout <<strlen(szTemp[0]) <<endl <<strlen(szTemp[1]) <<endl;
return 0;
}