Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- class Hoge
- {
- public:
- Hoge() { std::cout << "Create Hoge" << std::endl; }
- virtual ~Hoge() {}
- void say() { std::cout << "Hoge" << std::endl; }
- };
- class Hage
- {
- public:
- Hage() {}
- virtual ~Hage() {}
- Hoge* x;
- };
- int main(int argc, char *argv[])
- {
- Hage hage;
- hage.x->say();
- return 0;
- }
Add Comment
Please, Sign In to add comment