home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / classout.zip / CLASSOUT.CPP
Text File  |  2002-11-10  |  274b  |  24 lines

  1. #include <iostream.h>
  2.  
  3. extern "C"{ 
  4.     typedef struct{
  5.         int i;
  6.     }S;
  7. }
  8.  
  9. class C : public S{
  10.     public:
  11.         C(){ i=1; };
  12. };
  13.  
  14. void foo( S *s ){
  15.     cout << "i = " << s->i << endl;
  16. }
  17.  
  18. int main( )
  19. {
  20.     C c;
  21.     foo( &c );
  22.     return 0;
  23. }
  24.