Sorry i'm still not exactly sure what you are doing to compile the project? Can you say exactly what buttons/text/keys you're clicking on or pressing?
I'll explain my steps:
1. In my VC15 Pro, I did the same thing, -File->new-> project->Visual C++ ->win 32 console application -> Finish Wizard
2. I now have my TestVC15 solution open, and I copy-paste your OP code into TestVC15.cpp.
3. Then, I keep the menu bar options of "Debug", "x86", and "[Green Triangle play symbol] Local Windows Debugger".
4. I press the "[Green play symbol] Local Windows Debugger", it give a pop-up that says "This project is out of date", click Yes to building it.
5. It gives me an error that says "Unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h'" to your source?
6. Add a line to the top of my .cpp file
7. Now my code looks like this:
using namespace std;
cout << "asdf";
8. Press Play button again (Local Windows Debugger).
9. Press Yes to building out-of-date project
10. The program runs successfully (and then immediately closes since I haven't set the console to stay open, see http://www.cplusplus.com/forum/beginner/1988/
for solutions on keeping the console window open)
Tell me if that works, and if not, explain when exactly it stops working. There's an option not to use the pre-compiled headers, but I'm just doing the default configuration without having to change properties.