Newbie: Please help on Bloodshed C++

R

Rick

Hi, I've installed the IDE on my pc ported with MingW compiler. My
libraries are working as I am compiling programs, but I can see the console
window as it closes. I know about the checkbox for keeping the console
window open.
My system is w2k pro. Incidentally, MS-C++ works on my pc with no problems,
but I would like to learn about non-MS products. Please help.
Regards,
Rick
 
J

Joe C

Rick said:
Hi, I've installed the IDE on my pc ported with MingW compiler. My
libraries are working as I am compiling programs, but I can see the console
window as it closes. I know about the checkbox for keeping the console
window open.
My system is w2k pro. Incidentally, MS-C++ works on my pc with no problems,
but I would like to learn about non-MS products. Please help.
Regards,
Rick

Rick, either run the program from a command prompt, or include something
like:

cin.get();

at the end of your program to cause the program to wait for you to press
<Enter> before exiting.
 
K

Kevin Goodsell

Rick said:
Hi, I've installed the IDE on my pc ported with MingW compiler. My
libraries are working as I am compiling programs, but I can see the console
window as it closes. I know about the checkbox for keeping the console
window open.
My system is w2k pro. Incidentally, MS-C++ works on my pc with no problems,
but I would like to learn about non-MS products. Please help.
Regards,
Rick

This is not a C++ issue. The problem is your expectations, I think. Why
should the program's console stick around after the program is finished?
Solutions include delaying the termination of the program (with an input
line, for example), running the program from a more permanent terminal
(such as a DOS prompt), and running the program from another program
that holds the console open after your program finishes, until you
dismiss it.

If you want details on these, you should ask in a more appropriate
group, possibly one that discusses your OS, programming on your OS, or
your C++ implementation.

-Kevin
 
R

Rick

Ok thanks guys. I figgered it out. It seems GNU is also not MS. The IDE
(only 8MB comapred to Vis C++'s odd 500MB) only lets you create files within
its own directory.Easy as that. Oh and Kevin get a tissue.
Goodby all.
 
G

gswork

[toppost fixed]
Ok thanks guys. I figgered it out. It seems GNU is also not MS. The IDE
(only 8MB comapred to Vis C++'s odd 500MB) only lets you create files within
its own directory.Easy as that. Oh and Kevin get a tissue.
Goodby all.

I use dev c++ often when on win32, you can create files anywhere you
like. This seems unconnected to your console dissapearing problem.
One standard way to send commands to the OS, to 'pause' for instance,
would be to use the function "system()", to be found in <cstdlib>,
e.g. system("pause");

no guarantee as to what the command means to the OS though!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top