#include <iostream>

enum classId
{
 person,
 gunslinger,
 pokerplayer,
 baddude,
};

class Person
{
 public:
  int foo;

  Person( ) : foo( classId::person ) { }
  Person( int f ) : foo( f )     { }

  Person( const Person &) = default;

  int get_foo( ) const
  {
   return foo;
  }
};

class Gunslinger : public Person
{
 public:
  Gunslinger( ) : Person( classId::gunslinger ) { }
  Gunslinger( int f ) : Person( f ) { }

  Gunslinger( const Gunslinger &) = default;
};

class PokerPlayer : virtual public Person
{
 public:
  PokerPlayer( ) : Person( classId::pokerplayer ) { }
  PokerPlayer( int f ) : Person( f ) { }

  PokerPlayer( const PokerPlayer &) = default;
};

class BadDude : public Gunslinger, public PokerPlayer
{
 public:
  BadDude( ) : Gunslinger::Person( classId::baddude ), Gunslinger(classId::baddude), PokerPlayer( classId::baddude ) { }
};


int main( )
{
 BadDude bd;

 std::cout << static_cast<Gunslinger>(bd).get_foo() << std::endl;
 std::cout << static_cast<PokerPlayer>(bd).get_foo() << std::endl;

 return 0;
}
