2009-11-20から1日間の記事一覧
stringstreamのバッファはstr()してもクリアされない 場合がある。なので ss.str("");
int rem=dollars%1000; char buf[128]; sprinf(buf, ",%3d", rem); string s = string("hoge") + buf;1つのhint.
string s = "hello i am hoge"; stack<char> st; for(int i=0; i</char>
string s = "hello"; reverse(s.begin(), s.end()); cout << s << endl;STLのincludeでreverse()が定義されているようだ。