Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Base
- {
- virtual ~Base() {}
- int id;
- };
- struct Derived : Base
- {
- int d;
- };
- int foo(Base *b)
- {
- return 0;
- }
- int main()
- {
- Derived d;
- foo(&d);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement