I (accidentally) had code along the lines of this:
1 2 3 4 5 6 7 8 9 10 11 12 13
class foo {};
class bar {
public:
foo x;
void doStuff ();
};
void bar::doStuff () {
foo x = new foo ();
// Try to do something intelligent and fail miserably...
}
The question is: Why does this compile/what on earth is it doing??