[code type="markup"]
class Persona {
public:
Persona();
Persona(string n, string c, int a);
string get_name() const;
string get_cognome() const;
string get_age() const;
private:
string nome;
string cognome;
int age;
}
[/code]
Data la precedente definizione di classe... come è possibile rispondere alla seguente domanda:
Qual è l'overload usato in Persona???????????????????
Grazie in anticipo!!
:roll:
- Mauro
- S.O.S. Computer
- Mercoledì, 21 Settembre 2005
- Subscribe via email
Comment
There are no comments made yet.
Accepted Answer
Pending Moderation
[code type="markup"]
class Persona {
public:
Persona();
Persona(string n, string c, int a);
[/code]
Qual è l'overload usato in Persona???????????????????
L'overload qui è quello dei costruttori della classe Persona. Il metodo costruttore è "sovraccarico" e viene chiamato quello giusto a seconda di quanti argomenti vengono passati al costruttore.
Comment
There are no comments made yet.
- more than a month ago
- S.O.S. Computer
- # 1
- Page :
- 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
Be one of the first to reply to this post!
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here. Register Here »