dimanche 3 juin 2018

What is the meaning of define function as const?

given declaration of function like:

void Func(int x, int y) const;

What is the meaning of const in this case?

and if I defines method in class in this way, what it's say?
for example:

class CLS {
public:
void print() const;
}

Aucun commentaire:

Enregistrer un commentaire