So, I have this question. Why does cout throws
error C2065: \'cout\' : undeclared identifier
I am using Visual Studio 2012 as an IDE and I
This error also occurred in the Visual Studio 2017 IDE. Moving stdafx.h to the top solved the error.
For more on stdafx.h, see What's the use for "stdafx.h" in Visual Studio?