Aracılığıyla paylaş


basic_string::const_pointer

Bir işaretçi sağlayan bir tür bir const bir dize öğesi.

typedef typename allocator_type::const_pointer const_pointer;

Notlar

Tür eşanlamlıdır allocator_type::const_pointer.

Yazıda dize, eşdeğeri olan char*.

Bunlar bildirirken const bildirilen işaretçiler başlatılmalıdır.Const işaretçiler her zaman aynı bellek konumuna işaret ve sabit veya nonconstant veri üzerine.

Örnek

// basic_string_const_ptr.cpp
// compile with: /EHsc
#include <string>
#include <iostream>

int main( ) 
{
   using namespace std;
   basic_string<char>::const_pointer pstr1a = "In Here";
   const char *cstr1c = "Out There";

   cout << "The string pstr1a is: " << pstr1a <<  "." << endl;
   cout << "The C-string cstr1c is: " << cstr1c << "." << endl;
}
  
  

Gereksinimler

Başlık: <string>

Namespace: std

Ayrıca bkz.

Başvuru

basic_string Class