I was going through some tutorial online and found one c++ snippet which i am unable to figure out what exactly that snippet is doing. I need info like what this concept is called and why it is used.
Code is:
class Base{
int x;
public:
Base(){}
Base(int x): x{x}{} // this line i am unable to understand.
};
I want to know what this 5th line does and what is happening in compiler while compiling.