#include <iostream>
using namespace std;
int main()
{
char *p = (char*)"hello !";
char a[] = "hello !";
cout<< *(p ) <<"\n";
cout<< a <<"\n";
}
cout<< *(p ) <<"\n"; 结果为 h
cout<< p <<"\n"; 结果为 hello !
cout<< *(p + 1 ) <<"\n"; 结果为 e
#include <iostream>
using namespace std;
int main()
{
char *p = (char*)"hello !";
char a[] = "hello !";
cout<< *(p ) <<"\n";
cout<< a <<"\n";
}
cout<< *(p ) <<"\n"; 结果为 h
cout<< p <<"\n"; 结果为 hello !
cout<< *(p + 1 ) <<"\n"; 结果为 e