I wrote my own first little code, and was pleased to see it working while launching it from the Visual Studio. Then I, however, wanted to paste the .exe file to the desktop so I could run it without the need to run VS first, but it would not execute. The console itself opens for about a second, there is nothing in the console (there is supposed to be), and it shuts down immediately. Again, whole process takes about a second.
I have tried even doing the same with the basic "Hello world!" program VS gives as a default new project, but it was the same. Then I tried changing locations of the project, allowing it on the Firewall, turning off Firewall, turning off Smartscreen, allowing it in Malwarebytes.
Any help greatly appreciated, I feel I may have missed on something while installing the VS perhaps, but my C++ program works just fine.