Consider this code:
class Test
{
public:
Test() { i = 0; }
private:
int i;
};
Data member 'i' is used even before it is declared/defined. Should this not be a compilation error ? (It compiled fine!!!)
The rule is that member functions defined in the class definition are compiled as if they were defined immediately after the class definition.