0
I'am using visual studio as IDE when i run the program the black screen shutdown automatically !!! anyone know the problem ?
18 Réponses
+ 2
make sure you add conio.h to use _getch ()
.....
+ 1
in older version getch(); and new version _getch();
+ 1
Thank you mukul it's working now 👍
+ 1
using the Ctrl+F5(run without debug)
not the F5(run with debug) if you do not debug your code
0
u must type _getch(); before return 0;
0
cout << "Hello World!" << endl;
getch ();
return 0;
like this 👆
0
yes but u forgot this _
0
_getch();
0
I think you mean cin.get()
'cause i do it like this and it work know
Thank you :)
0
your program has no reason to pause. you need to add one, basically get it to ask for input.
0
ur welcome
0
it didn't work when i wrote it
_getch ();
0
what is ur vs version?
0
2012
0
you can also use system ("pause") if you're only working with the program on windows
0
You may try these steps to avoid that problem: Go to project properties << config properties << linker << system << click subsystem << choose console << apply << ok
0
i didn't find linker ?!
0
getch work to hold the screen