刚来报到,刚接触编程时不会使用字符串,发现字符char的指针能指示字符串。纪念我的编程时代的开始~
int main()
{
typedef char *pstring;
const pstring cstr = "abcd";
const pstring *ps = &cstr;
decltype (cstr) ci ="efgh";
std::cout << cstr[2] << ","<< *ps <<","<< ci<< std::endl;
system("pause");
return 0;
}