yohhoyの日記

技術的メモをしていきたい日記

2012-06-01から1日間の記事一覧

C++標準文字列:c_str, data, operator[]

C++

C++標準ライブラリ文字列クラステンプレーstd::basic_stringのメンバ関数c_str, dataおよびoperator[]の仕様ついてメモ。 basic_string の data と c_str の挙動の変更 C++03 では c_str メンバ関数の返す文字列は null 終端されていることが保証されていま…