Hello Team,
I have a question on const vs non const and object return vs non object
return function and
which one will be called
ie.
void foo(); vs
void foo() const;
which one willl be called and under what circumstances. C++ allows
both signatures inside
the same class,
similarly
T bar();
T& bar();
which one will be called and under what circumstances.
and also a feedback on the following signatures.
int foo2(); vs
const int foo2();
Kindly provide an answer. It will be highly appreciated.
Thanks.
arun