Given the following definitions:
const int x = 17;
class A
{
public:
A( );
A(int x);
int f( )const;
int g(const A& x);
private:
int i;
};
Each of the three const keywords is a promise to the compiler that the
compiler will enforce. What is the promise in each case?
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.