Here is something I want to share with you.
If you program in C, with some console windows, the window might disappear after execution.
If you want to prevent that just add this line in front of the return 0; line in your main(void)
while(getchar() != '\n');
getchar() is defined in stdio.h.
What it basically does is wait for an end of line input (return key). Just press that and the window closes, end of the program!
Or you can try this (I read this in the comments, thanks!):
scanf("blah");
Goede methode
Maar waarom niet gewoon een scanf() toevoegen op het einde?
Doet hetzelfde (maar dan bij elke toets).
Grtz
Hier de propere code die de system(“pause”); nabootst in c#
public static void Pause()
{
Console.Write(“Press any key to continue . . . “);
Console.ReadKey(true);
}
grtz
Michaël
@Michael: dit is over C, niet C#
Maar toch bedankt
Thank you!!