Recode of Dukedom in C++