1. 程式人生 > >string、Ctring、Wstring的區別以及寬位元組與多位元組的運用

string、Ctring、Wstring的區別以及寬位元組與多位元組的運用

<span style="font-size:18px;"><span class="lnum" style="color:#606060;LINE-HEIGHT: 1.5">   1:  </span><span class="kwrd" style="color:#00ff;LINE-HEIGHT: 1.5">int</span> val;</span>
   2:  string str;
<span style="font-size:18px;"><span class="lnum" style="color:#606060;LINE-HEIGHT: 1.5">   3:  </span>stringstream ss (stringstream::<span class="kwrd" style="color:#00ff;LINE-HEIGHT: 1.5">in</span> | stringstream::<span class="kwrd" style="color:#00ff;LINE-HEIGHT: 1.5">out</span>);</span>
   4:  ss << str;
<span style="font-size:18px;"><span class="lnum" style="color:#606060;LINE-HEIGHT: 1.5">   5:  </span>ss >> val;</span>