(file) Return to main.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / vxworks / ctors / Attic

Diff for /pegasus/vxworks/ctors/Attic/main.cpp between version 1.1 and 1.1.2.1

version 1.1, 2007/12/01 18:23:24 version 1.1.2.1, 2007/12/01 18:23:24
Line 0 
Line 1 
   #include <cstdio>
   #include <cassert>
   
   class Global
   {
   public:
   
       Global()
       {
           magic = 0xCCCCCCCC;
       }
   
       ~Global()
       {
           magic = 0xDDDDDDDD;
       }
   
       static unsigned int magic;
   };
   
   unsigned int Global::magic = 0x00000000;
   
   static Global _global;
   
   // VxWorks entry point:
   extern "C" void test_ctors()
   {
       assert(Global::magic == 0xCCCCCCCC);
       printf("Global constructors okay\n");
   }


Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2