|
From: VILAYA T. <vil...@am...> - 2000-11-13 01:20:29
|
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()
{
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???
Thanks
Rob
Vilaya Tours
c/o Gran Hotel Vilaya
Jr. Grau 624
Chachapoyas
Peru
Tel: 044 777506
Fax: 044 778154
Email: vil...@wa...
www.vilayatours.com
|
|
From: lstar36 <ls...@fl...> - 2000-11-13 02:34:11
|
----- Original Message -----
From: "VILAYA TOURS" <vil...@am...>
To: <dev...@li...>
Sent: Sunday, November 12, 2000 7:19 PM
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()
> {
> cout <<"Hello";
getch(); // this will stop the screen untill you hit a key
> }
>
> 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???
>
> Thanks
>
> Rob
> Vilaya Tours
> c/o Gran Hotel Vilaya
> Jr. Grau 624
> Chachapoyas
> Peru
>
> Tel: 044 777506
> Fax: 044 778154
> Email: vil...@wa...
> www.vilayatours.com
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users
>
|
|
From: <jor...@wa...> - 2000-11-13 05:33:22
|
Intenta tambiem añadir, como ultima linea , system("pause"); . Hazlo antes
de la ultima llave de cierre
----- Original Message -----
From: "VILAYA TOURS" <vil...@am...>
To: <dev...@li...>
Sent: Monday, November 13, 2000 2:19 AM
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()
> {
> 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???
>
> Thanks
>
> Rob
> Vilaya Tours
> c/o Gran Hotel Vilaya
> Jr. Grau 624
> Chachapoyas
> Peru
>
> Tel: 044 777506
> Fax: 044 778154
> Email: vil...@wa...
> www.vilayatours.com
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users
>
|
|
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
|
|
From: Saundra S. <Sch...@ho...> - 2000-11-14 04:13:44
|
This seems to be a common question....I too had the same problem....I've
been using the following command before the return statement.
system("pause");
Basicaly the system call works with DOS commands like pause and cls. I
haven't tried others, but these two work to hold the screen and clear the
screen.
Sam
----- Original Message -----
From: Ioannis Vranos <no...@ya...>
To: <dev...@li...>
Sent: Monday, November 13, 2000 6:30 AM
Subject: RE: [Dev-C++] Starting out
>
> > -----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
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users
>
|
|
From: Len W. <le...@lw...> - 2000-11-14 05:09:20
|
Using system("pause") to keep the DOS console window open is actually =
covered in the DEVC FAQ - it was the first question that I wanted to ask =
too....:)
|