2000

Grusel++ of the month

Home
Download Source
/******************************************************************************/
/*                                                                            */
/*                                                            FILE: MARCH.CPP */
/*                                                                            */
/*  Exceptional "Hello World"                                                 */
/*  =========================                                                 */
/*                                                                            */
/*  Compiled and tested with Visual C++ V6.0                                  */
/*                                                                            */
/*  V1.00   18-MAR-2000   P. Tellenbach   http://www.heimetli.ch/             */
/*                                                                            */
/******************************************************************************/

#include <iostream.h>
#include <stdlib.h>
#include <eh.h>

void print()
{
  cout << "Hello World" ;
  exit( 0 ) ;
}

class HelloWorld
{
 public:
   HelloWorld()
   {
     set_terminate( print ) ;
   }

   ~HelloWorld()
   {
     throw HelloWorld() ;
   }
} ;


int main( void )
{
  throw HelloWorld() ;
  return 0 ;
}