I had the same issue when starting a ms c++ 2010 project from scratch - I removed all of the header files generated by ms and but used:
#include "stdafx.h"
#include
using namespace std;
int main() {
cout << "hey" << endl;
return 0;
}
I had to include stdafx.h as it caused an error not having it in.