P
puzzlecracker
class Foo {
public:
void modify(); // make some modify to the this object
};
int main()
{
const Foo x;
Foo* p;
const Foo** q = &p; // q now points to p; this is (fortunately!) an
error
*q = &x; // p now points to x
p->modify(); // Ouch: modifies a const Foo!!
...
}
This is beautiful ... the POWER OF TODAY.... and many years ahead.
public:
void modify(); // make some modify to the this object
};
int main()
{
const Foo x;
Foo* p;
const Foo** q = &p; // q now points to p; this is (fortunately!) an
error
*q = &x; // p now points to x
p->modify(); // Ouch: modifies a const Foo!!
...
}
This is beautiful ... the POWER OF TODAY.... and many years ahead.