Aracılığıyla paylaş


wstring

Geniş karakter dizesi bildirir.wstringŞablon sınıfını uzmanlaşmış bir typedef değil basic_string içerecek şekilde wchar_t dize verileri.wstringyeteneklerini miras basic_string class; Bu operatörleri ve yöntemleri içerir.

Specialize diğer TypeDef basic_string dahil dize, u16string, ve u32string.Daha fazla bilgi için bkz. <string> Üyeler.

typedef basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstring;

Örnek

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

int main( ) 
{
   using namespace std;
   // Equivalent ways to declare an object of type
   // basic_string <wchar_t>
   const basic_string <wchar_t> s1 ( L"abc" );
   wstring s2 ( L"abc" );   // Uses the typedef for wstring

   // Comparison between two objects of type basic_string <wchar_t>
   if ( s1 == s2 )
      cout << "The strings s1 & s2 are equal." << endl;
   else
      cout << "The strings s1 & s2 are not equal." << endl;
}
  

Gereksinimler

Başlık: <string>

Namespace: std

Ayrıca bkz.

Başvuru

basic_string Class