C++: How to execute a program without entering into main( ) function?
How to execute a program without entering into the main( ) function?
Here is a program which ends before execution of the main( ) function starts but still manages to generate output.
class A
{
public :
A( )
{
cout << "In A" ;
exit( 1 ) ;
}
} ;
main( )
{
cout << "not reached" ;
}
A a ;




Comments
Log in or create a user account to comment.