fbpx
Skip to main content
  1. Mauro
  2. S.O.S. Computer
  3. Mercoledì, 21 Settembre 2005
  4.  Subscribe via email
[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:
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.
  1. more than a month ago
  2. S.O.S. Computer
  3. # 1
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!