Constructeur paramètre facultatifs
Bonsoir , j'aimerais savoir si cela est faisable , j'ai tenté mais cela ne fonctionne pas , je m'explique :
prototype :
Code:
Constructeur(const char*,const char*,int);
définition:
Code:
1 2 3 4 5
|
Constructeur ( const char *a, const char *b=" ", int c = 0 )
{
..
} |
J'aimerais ,par exemple,pouvoir faire ceci à l'appel :
Code:
1 2
|
Constructeur("azerty"); |
ou
Code:
1 2
|
Constructeur("azerty","qwerty"); |
Comment cela est-il faisable s'il vous plait ? :)
D'avance, merci !
Bonne soirée