reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
#include <stdio.h>

namespace namesp
{
  class Virtual {
  public:
    virtual void doSomething() {
      printf ("namesp function did something.\n");
    }
  }; 
}

class Virtual {
  public:
  virtual void doSomething() {
    printf("Virtual function did something.\n");
  }
};

int
main()
{
  namesp::Virtual my_outer;
  Virtual my_virtual;

  // Break here to get started
  my_outer.doSomething();
  my_virtual.doSomething();

  return 0;
}