Hi all,

just wonder is there any way to have a constructor parameters that having another classes with parameter?

for example like

class Player
{

public:
    Player(char = 'X', char = 'O');
};

class Board
{
public:
    Board(int, Player);
};

nvm, solved.

thank a lot :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.