|
From: Ioannis V. <no...@ho...> - 2002-04-12 16:22:26
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of Kenneth Armstrong
> Sent: Friday, April 12, 2002 5:35 PM
> To: dev...@so...
> Subject: [Dev-C++] Re: MS problem
>
>
> ok, i moved it from the C++ Debug folder (that's the only
> spot where i find
> the console programs that i have created) onto the desktop.
> tried to run
> them and again they just flash on and off. so i tried it
> from the command
> prompt and it worked there. i don't understand. what if i
> were to make a
> program for someone else to use and they can't run it in
> windows? most dos
> programs i've seen will run in a dos window in windows
> without having to go
> straight to the command line.
So you want after some operation the window to not close. This should
happen from inside the VC++ 6 environment when you press the run button.
If it doesn't wait it means there are '\n's in the stream. This probably
happens because you use scanf(). After every scanf() statement you must
get the '\n' out of the stream. Like this:
#include <stdio.h>
....
scanf("%s", s);
getchar();
For all the above i assumed C.
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys
|