I have problem to cast one class to another which inheritance from the first one. This is my function:
unique_ptr<game_state<int>> new_state = c4->make_move(column);
And now I want to overwrite it so I've tried like this:
c4 = dynamic_cast<unique_ptr<connect4<int>>*>(new_state);
but it don't work. That's how I declare my c4 object:
unique_ptr<connect4<int>> c4;
and my class:
template <typename Move>
class connect4 : public game_state<typename Move>
Any ideas?