Answer the question
In order to leave comments, you need to log in
Is there a difference where to put const for a method in c++?
Is there any difference between these two code options:
const int get_NOD() {
return NOD;
}
int get_NOD() const{
return NOD;
}
Answer the question
In order to leave comments, you need to log in
There is a difference, and a big one:
const int get_NOD() {
return NOD;
}
int get_NOD() const{
return NOD;
}
const int get_NOD() {
return NOD;
}
int const get_NOD() {
return NOD;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question