C++相談室 part77
■ このスレッドは過去ログ倉庫に格納されています
0094デフォルトの名無しさん
2010/01/19(火) 22:16:46規格にはこう書いてある↓
21.3.6 basic_string string operations [lib.string.ops]
const charT* c_str() const;
1 Returns: A pointer to the initial element of an array of length size() + 1 whose first size() elements
equal the corresponding elements of the string controlled by *this and whose last element is a
null character specified by charT().
2 Requires: The program shall not alter any of the values stored in the array. Nor shall the program treat the
returned value as a valid pointer value after any subsequent call to a non-const member function of the
class basic_string that designates the same object as this.
■ このスレッドは過去ログ倉庫に格納されています