+ 1
What do you mean by colon operator(:)?
class MyClass { public: int var; MyClass() {} MyClass(int a) : var(a) { } //Why there is colon(:) in between constructor and class member? };
2 ответов
+ 2
It's called initializing list. It just initializes your "var" with value of "a".
+ 1
thanks man.....👍👍👌