Check out example codes for "how initilaize deffult value to c++ class". It will help you in understanding the concepts better.

Code Example 1

class X {
  int i = 4;
  int j {5};
public:
  X(int a) : i{a} {}  //initializes with a and 5
  X() = default;      //initializes with 4 and 5
};

Learn ReactJs, React Native from akashmittal.com