I saw this code on the Internet and I didn't understand it. Could anyone help me to translate it? Are the constructors defined and initialized correctly?
struct account {
string login;
string surname;
string name;
string passwd;
bool connecte;
/** accessInt :
int accessInt;
/** acl : acl */
acl* accessListe;
//constructers
account()
{
}
account(
const string & login, const string & surname,
const string & name, const string & passwd, const bool connecte , const int & accessListe
) : login(login), surname(surname), name(name), passwd(passwd), connecte(connecte), accessInt(accessListe){
accessListe = new acl(accessInt);
}
account(
const char * login, const char * surname,
const char * name, const char * passwd, const bool connecte , const int & accessListe
) : login(login), surname(surname), name(name), passwd(passwd), connecte(connecte), accessInt(accessListe){
accessListe = new acl(accessInt);
}
friend std::ostream &operator<<(std::ostream &c, const account& ac) {
c << "a:" << ac.login << ":" << ac.surname << ":" << ac.name << ":" << ac.passwd << ":" << ac.accessListe->toInt();
return c;
}
};