Go4Expert (http://www.go4expert.com/)
-   Meet and Greet (http://www.go4expert.com/community/meet-and-greet/)
-   -   Hi programer (http://www.go4expert.com/community/hi-programer-t1333/)

sam_mcgowan 2Sep2006 21:27

Hi programer
Hi I am new to both programing and the forum, I wish this one to be very learning experience for me.

shabbir 2Sep2006 21:34

Re: Hi programer
Yes sure you will have. Welcome to G4EF.

sam_mcgowan 3Sep2006 01:30

Re: Hi programer
Hi Shabbir thanks for the welcome.
I have VERY basic question. I have just started learning c++. My problem is when I comile and run my first program (just to print " Hello World"). The the result window disappears in a fraction of a second and I can not view the result. I use Dev-C++ free compiler. Is there any way I can see the result window for a longer time.
Thanks for looking at very basic question.
I hope to get some solution and try running more programs over this labor day weekend.

shabbir 3Sep2006 11:16

Re: Hi programer
Try using getch() function before the return statement of the main function and you should see the window not disappear until you press any key. getch() is defined in conio.h file and so may need to include the header file as well.

sam_mcgowan 3Sep2006 19:02

Re: Hi programer
Thanks! amazingly it worked! This will help me ramp up building new programs and running them.
Just now I also found another way in the software FAQ: use of- system ("pause"); along with inclusion of stdlib.h.
Maybe there are several other avenues to pursue one thing!

shabbir 3Sep2006 19:40

Re: Hi programer
Yes thats true. pause is a system command and may not work on any other OS apart from DOS.

All times are GMT +5.5. The time now is 05:46.