Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

borland 5.02 1

Status
Not open for further replies.

Sam1

Programmer
Dec 13, 2000
1
0
0
US
i recently started using borland 5.02.
when compiling my programs and running them i get a DOS execution window
that flashs for a second and then disappears. can anyone tell me how
to keep the Dos window open so i can check out the execution.
thank u
 
Right-click the program's .exe file choose "Properties", then select the "Program" tab. Uncheck "Close on Exit". Rob Marriott
robert_a_marriott@yahoo.com

Hire me! Full-time, contract, whatever...shhh don't let my current employer know I said that.
 
You mean from project window to right-click the .exe file?
But I couldn't find the program tab.

Albert
 
Another way is to simply put a couple of lines in just before the program ends that will wait until you press ENTER. For example:
Code:
char c;
cin >> c;
James P. Cottingham
 
Hey.
I have not checked any of the above answers but this is what I do to fix the problem.

Always create a project (New -> Project). Then, a console appears. After typing in the file name etc.
In the Target Type list box provided, choose EasyWin(.exe).
Platform should be set to Win 32. Under that, select GUI.
Under Frameworks, choose Class Library and OWL.
CLick the Advanced tab and choose .cpp node. Deselect .rd and .def nodes.
That should solve the problem, I hope.

Narayanan Srinivasan
coolie91@hotmail.com

Brothers and Sisters from India, if you have any recent news regarding F-1 to H-1B visa transfer, please e-mail me. Thanks.
 
declare a char in main()

before the closing } in main() cin>>"char variable name"

the dos execution window will stay open until you press a key and hit enter
 
Kind of an old thread, but another way would be to include the conio or constre header file and then use getch() to wait for a key to be hit.

example:
#include <constrea.h>

int main(){

cout<<&quot;Waiting for you to press a key to exit...&quot;<<endl;
getch();

return 0;
}

This is a fairly nice way to solve your problem since you don't have to declare any extra variables.

happy programming!
 
Open a &quot;Dos Prompt&quot; console first, then run your program. This way your application is running within something and not by itself.
At this point, you can also right-click on the Window's title bar, go to properties, and uncheck &quot;Close on exit&quot;. Apply this and then you can run your apps in future on their own.
Hope this helps.
 
I've just got Borland 5.02, and am learning C++. Can anyone tell me where I can get basic info on how to use Borland 5.02. It seems to be a very sophisticated tool.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top