Check out example codes for "c++ class member initializer list". It will help you in understanding the concepts better.

Code Example 1

#include <iostream>
class Entity {
private : 
	std::string m_Name;
	int m_Score;
	int x, y, z;
		:m_Name("[Unknown]"),m_Score(0),x(0),y(0),z(0)//initialize in the order of how var are declared
	Entity (const std::string& name) 
	const std::string& GetName() const { return m_Name; };
int main()
	Entity e1;
	std::cout << e1.GetName() << std::endl;
	Entity e2("Caleb");
	std::cout << e2.GetName() << std::endl;

Learn ReactJs, React Native from