Archive for the “C” Category

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");

Comments 4 Comments »

And shepherds we shall be, for thee my Lord for thee, power hath descended forth from thy hand, that our feet may swiftly carry out thy command. We shall flow a river forth to thee, and teeming with souls shall it ever be. In nomine Patris, et Filii, et Spiritus Sancti.