Here is my header file:
class MapObject: public ScreenObject {
    static float xoffset, yoffset;
public:
    static float Getxoffset() {
        return xoffset;
    }
};
#endif // MAPOBJECT_H
However on the line return xoffset; I get the following error: undefined reference to `MapObject::xoffset' why?
 
     
     
    