Rename class members by inheriting class in C++
I would like to "rename" some members of my class ofVec4f . I know it's impossible in strict C++ but could I create a new class that inherits from my class and declare new members which are aliases or pointers to the original members? I tried the following: class ofVec4fGraph : public ofVec4f { public : float& minX; float& maxX; float& minY; float& maxY; ofVec4fGraph(float _minX,float _maxX, float _minY, float _maxY ) : minX(_minX), maxX(_maxX), minY(_minY), maxY(_maxY) { ofVec4f(_minX, _maxX, _minY, _maxY); }; }; Mohit Jain Your class should be: class ofVec4fGraph : public ofVec4f { public :