Link to home
Start Free TrialLog in
Avatar of ol muser
ol muserFlag for United States of America

asked on

console application hanging

What are the typical causes that might make a console application hang after the return statement? Below are the last two statements:
	cout << "\n lost connection with server, exiting";
	return 0;

Open in new window

The cout statement gets printed and it almost like the return statement never gets executed.

I am running this in DEBUG configuration in RADstudio.
ASKER CERTIFIED SOLUTION
Avatar of imladris
imladris
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ol muser

ASKER

It was just a console application. I just tried creating a VCL forms application. The application runs OK if it is just by itself. I add a few static libraries to the project. The application seems to run but the main form won't show up. So the only option I have is to stop the application from IDE as I am running it in debug mode. Those static libraries used to work before. Is my system getting corrupted or is it some known issue with RAD studio 2010?
SOLUTION
Avatar of pepr
pepr

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of theKashyap
theKashyap

Did you already do step-by-step execution?
What does the call stack show after execution of "return 0;"?

PS: At least and endl should be put at the end of cout, if not flush as a good coding practice. Though I don't see how it's connected to the problem.