I have this code sample:
class Number { int i; public: Number(int i1): i(i1) {} operator int() const {return i;} };
What are
If you have a function like this:
void f(const Number& n) { int n1 = n; }
It will start giving compilation error if you remove const in the casting operator.