YOU are missing the using namespace std; statement if you work in visual c++ .