I have the following code
int main()
{
cout << "Please enter your name..." << endl;
cin >> name;
cout << "Data type = " << typeid(name).name() << endl;
cin.get();
return 0;
}
According to the various textbooks and pieces of documentation I've read about the typeid operator, I should expect to read
"Data type = string"
as the output. Instead, I get the following
class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >
Does anyone have any idea where I'm going wrong? FWIW, I'm using Visual Studio 2010 Professional.