|
From: Ioannis V. <no...@ya...> - 2000-11-13 14:50:42
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...]On Behalf Of
> VILAYA TOURS
> Sent: Monday, November 13, 2000 3:20 AM
> To: dev...@li...
> Subject: [Dev-C++] Starting out
>
>
> I am just starting out with C++. I have the Oleg Yaroshenko "The
> Beginner's Guide to C++" and I am trying the first example. I am
> using the
> Dev-C++ 3.9. Problem is that the small program of:
>
> #include <iostream.h>
>
> void main()
int main()
> {
> cout <<"Hello";
> }
>
> flashes up and is gone straight away. I have tried making the adjustmants
> reccommended in the help and various other ideas but to no avail. I know
> this is simple, but what is the answer. Also which mode should I be
> working in for the Oleg's book - cosole, MSDos, Windows, Empty???
Open a command prompt window, enter in the directory of your program using
cd /directory and run the executable from there. I think an autopause
routine must be implemented in the execute option of Dev--C++. I had sent
one written in C to Colin in the past. Colin, i think you should include one
in next version of Dev-C++ (Visual C++ has the same feature too). :)
Another way is to #include <cstdlib> or #include <stdlib.h> and use the
system("pause") command, or use getchar() or cin.get() or something else.
Ioannis
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
|