ISO C++11 doesn't allow conversion from string literal to 'char*'
string类型与char const *类型在做书上的例题是遇到如下问题:int main(){ char *pch = "abc"; // caution:ISO C++11 doesn't allow conversion from string literal to 'char*' cout<<pch<<endl; cout<<(void*)pch<<endl;}
原创
2016-06-21 21:14:27 ·
16822 阅读 ·
0 评论