Check out example codes for "is not a nonstatic data member or base class of class". It will help you in understanding the concepts better.

Code Example 1

struct A {
    float m_x;
    float m_z;
    A(){}
protected:
    A(float x): m_x(x) {}
};

class B : public A {
public:
    B(float z) : A(z) {}
    // alternatively
    // B(float z) {
    //     m_x = z;
    // }
};

int main(){
    B b(1);
    return 0;
}

Learn ReactJs, React Native from akashmittal.com