basic_string::value_type
문자열에 저장된 문자의 형식을 나타내는 형식입니다.
typedef typename allocator_type::value_type value_type;
설명
It is equivalent to traits_type::char_type and is equivalent to char for objects of type string.
예제
// 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