I am having trouble getting started with C++ on Windows 10. I have used C++ before on Windows 8.1, with both the Geany and Visual Studio IDEs. I am struggling to work out if my problem is with what I'm doing or with Windows 10 itself, so I have tried to take as standard approach as possible to recreating my problem. The process is therefore from the cplusplus.com tutorial at http://www.cplusplus.com/doc/tutorial/introduction/visualstudio/
I have installed Visual Studio Community 2015. I have installed Visual C++ support from within the application. I have then started a C++ console application, ticking 'empty project', and made one file.
Then, I have pressed Ctrl+F5 to compile and run. The build is successful and a command prompt opens. The command prompt is however blank except for a blinking cursor. Ctrl+C does nothing. The window can be closed with no trouble. While the window is open, rebuilding fails because the .exe is in use.
If I run from command prompt I get the same behaviour - a blank new line with a cursor.
Has anyone had similar problems before, or since the Threshold 2 update to Windows 10 which I recently received? I find when I make new projects in Geany, the same thing happens. Can anyone advise me on what approach I should take to get back in business with C++?
I also suspect antivirus. I had trouble when avast kept deleting ld.exe without even asking first! Since then I have just added my compiler directory and *\a.exe to the ignore list. So, hopefully nobody drops a virus named a.exe to me.
@codekiddy
I agree with what you say too. The list that MVPS gives out to block advertising sites seems to cut down on any bad URLs coming my way. I did not have that when I first started using avast several years ago. With peerblock also being used, maybe now I could just ditch antivirus protection entirely. http://winhelp2002.mvps.org/hosts.htm
Bingo, right on the money. Thank you Chervil, Kevin, it was indeed Avast. Disabling Avast shields for one minute let me run them, so I guess Avast was just stopping Windows from accessing the file to run, which is why there was no error or output of any kind.
Now to decide which is least annoying: adding every newly compiled executable to the exclusions or finding and installing different antivirus software...
Update: In fact, I didn't have to make that decision, I had to update the Avast software to the latest version and hey presto, everything works as it should. Thanks for your help, folks.