I have this class:
class BankAccount{
private:
char* ownerName;
char IBAN[14];
double balance;
}
And I have this function:
char* BankAccount::getIban(){
return this->IBAN;
}
That one is valid but I wonder why I can't define getIban() like this, because I want to make sure that IBAN can't be changed :
char* BankAccount::getIban()const{
return this->IBAN;
}
It says return value does not match the function type.