Partager via


basic_string::pointer

Un type qui fournit un pointeur vers un élément de caractère dans une chaîne ou un tableau de caractères.

typedef typename allocator_type::pointer pointer;

Notes

Le type est un synonyme de allocator_type::pointer.

Pour le type string, c'est correspond à char*.

Exemple

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

Configuration requise

En-tête : <chaîne>

Espace de noms : std

Voir aussi

Référence

basic_string, classe