```
class Foo {
private:
    string x;
};

class Bar : public Foo {
public:
    void get_data() {
        cin >> x;
    }
};

```

I don't quite understand why this line of code is not working. Isn't the ability to do this the purpose of inheriting member variables?