Allora, una funzione/metodo che prende parametri passati come const
Ok, sempre usati, sempre andato tutto bene, però ora:
la firma del metodo è
void inserisciGruppo( const string &, const Account* & );
l'invocazione è
Account* Legami::crea_account_polimorfo(string line){ [....cose....] this->inserisciGruppo(idgruppo,tmp); }
idgruppo è una string creata dentro crea_account_polimorfo, tmp è un Account*, sempre creato in crea_account_polimorfo
errore:
scheletro_logica.cpp:73:46: error: no matching function for call to ‘Legami::inserisciGruppo(std::string&, Account*&)’ scheletro_logica.cpp:26:6: note: candidate is: void Legami::inserisciGruppo(const std::string&, const Account*&)
in pratica: non ho la funzione che prende string& e Account*&, ho quella che prende const string& e const Account&.
Perchè? Non dovrebbe funzionare?
Inb4 errore del cazzo.