/[libtool]/libtool/tagdemo/main.cpp
ViewVC logotype

Diff of /libtool/tagdemo/main.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by othman, Tue Feb 1 23:24:43 2000 UTC revision 1.3 by rboehne, Wed Jun 6 14:53:29 2001 UTC
# Line 21  Line 21 
21    
22    
23  #include "foo.h"  #include "foo.h"
24    #include "baz.h"
25  #include <stdio.h>  #include <stdio.h>
26    
27    
# Line 44  main (int, char *[]) Line 45  main (int, char *[])
45    if (fb->foo() == FOO_RET)    if (fb->foo() == FOO_RET)
46      printf("foobar::foo is ok!\n");      printf("foobar::foo is ok!\n");
47    
48      // --------------
49    
50      barbaz_derived BB;
51      // Instantiate the derived class.
52    
53      barbaz *bb = &BB;
54      // Have some fun with polymorphism.
55    
56    
57      // barbaz_derived::baz() should return FOO_RET since it calls
58      // foobar_derived::foo(), which in turn calls ::foo().
59      if (bb->baz() == FOO_RET)
60        printf("barbaz::baz is ok!\n");
61    
62    return 0;    return 0;
63  }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26