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;
}
  

要求

标头:< 字符串>

命名空间: std

请参见

参考

basic_string 类