FAQs about working with your IDE.
These apply to more than one IDE. Be sure to check the main course web pages under your specific IDE.
My program runs but the output window disappears instantly when the program terminates. How can I make it wait for me?
This is a stupid "feature" of some of the Wintel IDEs. Fortunately, it is easy to fix. Simply have your program ask for some input before the final return from your main function. For example:
cout << "Enter any character to terminate." << endl;
char junk;
cin >> junk;
return 0; // return from main function
There are two ways to do this:
After transferring to CAEN/ITD, type the following:
col -x <the_original_file_name> <new_file_name.cpp>
Also new_file_name should not be the same as the old name.
If for some reason this does not work, there is an alternative method: Type at the unix prompt :
dos2unix -ascii <original_file_name> <converted_file_name>
If the original file and the converted file are the same, dos2unix will rewrite the original file after converting it.