다음을 통해 공유


basic_string::value_type

형식 문자열에 저장 된 문자를 나타내는 형식.

typedef typename allocator_type::value_type value_type;

설명

해당 하는 traits_type::char_type 와 동일 합니다 char 형식의 개체에 대 한 문자열.

예제

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

int main( ) 
{
   using namespace std;

   basic_string<char>::value_type ch1 = 'G';

   char ch2 = 'H';

   cout << "The character ch1 is: " << ch1 << "." << endl;
   cout << "The character ch2 is: " << ch2 << "." << endl;
}
  
  

요구 사항

헤더: <string>

네임 스페이스: std

참고 항목

참조

basic_string Class