with all my applications I'm trying to open they won't work. When building programs in visual studio the program compiles opens and then closes straight away, leaving no messages or anything, but its the same with other applications
and the same thing happens, I open the application and it closes straight away.
I've updated all drivers on my laptop so not sure where the problem could be.
any help would be appreciated.
Are you writing console applications? If so, the console will close as soon as the program is run so if you want to take a look at your output you could add something like the following to the end of your program:
cin >> c;
This will force the console to remain open (in order to read in the char c) and allow you to read the output of the program. Once you press 'enter', the console will then close.
The breakpoint is definitely more efficient if all you want is to check that the program works as it's supposed to be and provides the appropriate output.
But it's not part of the written program itself, it only stops program execution at the designated line of code while debugging it inside Visual Studio. So if Gaskell1992 wants the program to leave the console open for inspecting output even outside Visual Studio, he will have to use something different than a breakpoint.