Skip to content

Instantly share code, notes, and snippets.

@mizutomo
Created December 17, 2010 02:42
Show Gist options
  • Save mizutomo/744409 to your computer and use it in GitHub Desktop.
Save mizutomo/744409 to your computer and use it in GitHub Desktop.
#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