class cl {
public:
cl(int i) { val=i; }
int val;
int double_val() { return val+val; }
};
Variable val is declared after the constructor, which assigns it. But still this code works. Isn't 'val' out of scope for constructor?