basic_string::pointer
문자열 또는 문자 배열에 있는 문자 요소에 대한 포인터를 제공하는 형식입니다.
typedef typename allocator_type::pointer pointer;
설명
The type is a synonym for allocator_type::pointer.
For type string, it is equivalent to 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