Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Executing programs with Borland C++ 5.01

Posted on 1997-02-26
6
Medium Priority
?
286 Views
Last Modified: 2008-03-06
Hello, I have recenty picked up Borland C++ v5.01 after using v4.5 at our schools computer lab for a long time.  My questiong is, how do I get programs to execute in v5.01 like they do in v4.5?  When I used to run programs using v4.5, the program was run in a text based window, supplied by the borland compiler.  Upon completion, this window would stay open and I would be able to print the output of my program.  Now with v5.01, whenever I run a program, it is executed in a dos-shell window.  Once the program is complete, the window immediately disappears.  Is there something I can do to get v5.01 the execute programs the same way as v4.5?  I am writing programs for one of my college classes and I need to print out the output and submit it.  Can someone help me please...  I hope I have specified enough info.  Thanks in advance..

Andy

email:
corsair@vax1.mankato.msus.edu
0
Comment
Question by:elmera
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 

Expert Comment

by:bc022297
ID: 1162004
Was the 4.5 app running in an EasyWin window?

If it's not to critical how the program works there are a couple of hacks you can use to keep the program active so you can examin its output.  Another option is to put a loop in main() that tests for a certain key stroke and then exits.
0
 

Expert Comment

by:pangofil
ID: 1162005
Do You produce DOS or Windows ( EasyWin ) .exe ?

0
 
LVL 3

Accepted Solution

by:
os012897 earned 150 total points
ID: 1162006
For win95 there is an option for msdos-windows to stay open
after program-completion. Use the Property dialog of the .exe
file to set this option (it is in the program-folder).

You caould alternatively redirect the program-output into a file
with the pipe .... "c:>program.exe > test.data"

Regards,

         os

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:elmera
ID: 1162007
Ok..  I figured out how to change the taget type to EasyWin, however, now whenever I go to run the program I get message that says "cannot make" and nothing else about why...  Actually I did get one program to run(somehow..) in the easywindow, but it said it couldn't debug 16-bit exe's.  Can I change something so that the program can be debugged upon execution?  Oh, and thanks for the info and selecting easywin.  
(message for bc, pangofil, and os)

Andy

email:
corsair@vax1.mankato.msus.edu
0
 
LVL 3

Expert Comment

by:os012897
ID: 1162008
I have to pass on EasyWindows ... sorry ...

os

0
 

Expert Comment

by:klecki_2000
ID: 2545421
I think that another way is to write getch() on your program and until you don't press any key the dos windows won't close.

good luck!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question