c++新手遇到一个问题,百度不到答案,想请教大家。
string s; s = "abc"+'b'; cout<<s<<endl;
代码的输出是:crt\crtw32\stdcpp\locale0.cpp
string s; s = "abc"; s += 'b'; cout <<s << endl;代码的输出是:abcb
想请教一下这是什么原因?
#笔试题目#string s; s = "abc"+'b'; cout<<s<<endl;
string s; s = "abc"; s += 'b'; cout <<s << endl;代码的输出是:abcb
相关推荐