Skip to content

Instantly share code, notes, and snippets.

@shomah4a
Created January 19, 2012 08:13
Show Gist options
  • Save shomah4a/1638701 to your computer and use it in GitHub Desktop.
Save shomah4a/1638701 to your computer and use it in GitHub Desktop.
メソッド解決できねーぞこの野郎エラー
#include <iostream>
class A
{
virtual void test(void) const
{
std::cout << "class A" << std::endl;
}
};
class B
{
virtual void test(void) const
{
std::cout << "class B" << std::endl;
}
};
class C: public A, public B
{
};
class D: public B, public A
{
};
class E: public C, public D
{
};
int main(const int argc, const char* const args)
{
const E x;
x.test();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment