Skip to content

Instantly share code, notes, and snippets.

@onqtam
Created February 6, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save onqtam/31d3adb28551be300c54 to your computer and use it in GitHub Desktop.
Save onqtam/31d3adb28551be300c54 to your computer and use it in GitHub Desktop.
class FirstBase {
int firstBaseData;
};
class SecondBase {
public:
void Method()
{
if( this == 0 ) {
printf( "this == 0");
} else {
printf( "this != 0 (value: %p)", this );
}
}
};
class Composed1 : public FirstBase, public SecondBase {
};
int main()
{
Composed1* object = 0;
object->Method();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment