Skip to content

Instantly share code, notes, and snippets.

@shihyu
Created September 26, 2018 14:36
Show Gist options
  • Save shihyu/9ef5b9a30e5221350fc1cbde00205627 to your computer and use it in GitHub Desktop.
Save shihyu/9ef5b9a30e5221350fc1cbde00205627 to your computer and use it in GitHub Desktop.
class A
{
public:
A()
{
m_gA = this;
}
static void test()
{
m_gA->m_a += 1;
}
void hello()
{
}
static int m_staticA;
static A* m_gA;
private:
int m_a;
};
int main()
{
A a;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment