Created
December 17, 2010 02:42
-
-
Save mizutomo/744409 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment