Visual studio setting | Sololearn: Learn to code for FREE!


Visual studio setting

Hi is anyboy here that works with visual studio? My code dont run, it has just compiled, black page has appeared and it disappear undoubtedly

5/1/2019 7:55:38 AM

zahra kazemi

6 Answers

New Answer


In visual studio run your code with ctrl-F5 or add an extra Console.ReadLine at the end of the code. Your code has run, but also closed before you could see the results.


I used control+f5 to execute my code, but I cant see the result it disappeare very fast


First clear this for me You are talking about visual studio code or visual studio IDE


if control f5 is not working, have a look at the following video. There is a visual studio setting which need to be set. quote : Please right click your project name and go to Properties page, please expand Configuration Properties -> Linker -> System, please select Console (/SUBSYSTEM:CONSOLE) in SubSystem dropdown. Because, by default, the Empty project does not specify it. If all above does not work. Add one of the following lines just before return; (last line of you code) system("pause"); And of course not Console.ReadLine (c#) but cin.get(); (C++)


Use cin.get () as last line of the main function or you can use system ("pause"); on windows