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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keeping programs open.

Status
Not open for further replies.

hwlfelon

Programmer
Mar 1, 2004
3
US
I have version 4.52 at school and 5.02 at home. At school my compiled programs stay open after they are done running but at home they close instantly. Is there any way to get programs to stay open when they are done running on 5.02?
 
This is a setting in Windows. Somewhere you can set Console (DOS) windows to stay open until they are closed by you. Most people just skip that and have the program ask for some sort of input from the user before closing, e.g.:
Code:
int main ()
{
    cout << "Hi, World" << endl;
    string GetInput;
    cin >> GetInput;
     return;
}

James P. Cottingham

There's no place like 127.0.0.1.
There's no place like 127.0.0.1.
 
And another thing, how do I get libraries that did not come with borland?
 
Actually, string does come with this version, but I cannot figure out how to assign a string variable, I just get an error. I open #include <string.h> then assign the variable: string x; but string does not turn bold and it does not recognize the word.
 
In some of the older versions I think you had to include cstring.h or use the keyword String (with capital S). It's been a while since I've used those versions.

There used to be a site that had the STL library for the older Borland versions but the last time I visited it they had moved the library to another site. I've since lost the URLs for both.

James P. Cottingham

There's no place like 127.0.0.1.
There's no place like 127.0.0.1.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top