basic_string::pointer
文字列または文字配列内の要素へのポインターを提供する型。
typedef typename allocator_type::pointer pointer;
解説
allocator_type::pointer型は、のシノニムです。
型 **[文字列]**の場合、**char***と同じです。
使用例
// basic_string_pointer.cpp
// compile with: /EHsc
#include <string>
#include <iostream>
int main( )
{
using namespace std;
basic_string<char>::pointer pstr1a = "In Here";
char *cstr1b = "Out There";
cout << "The string pstr1a is: " << pstr1a << "." << endl;
cout << "The C-string cstr1b is: " << cstr1b << "." << endl;
}
必要条件
ヘッダー: <string>
名前空間: std