blob: 38e46c03f41edc41304593f06051966f88073a99 (
plain) (
blame)
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;
}
|