I am a newbie in C++ programming and I'm trying to use std:: because someone told me that is a good habit rather than putting in using namespace std; because it pollutes the global namespace. I'm not sure why std::cin >> name; from my code below produce an error no operator '>>' matches these operands below is the full source code.
#include "stdafx.h"
#include <ios>
#include <iostream>
int _tmain(int argc, _TCHAR* argv[])
{
int x, y;
std::string name;
std::cin >> name;
std::cin >> x;
return 0;
}