Can anyone tell me what ":" this symbol used for | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

Can anyone tell me what ":" this symbol used for

public: // Constructor with member initializer.. MyClass(int h, int d, std::string n, std::string w) : health(h), damage(d), name(n), weapon(w) {}

2nd Apr 2021, 1:06 AM
Nitin Bisht
Nitin Bisht - avatar
1 ответ
+ 5
member initializer list..there is a lesson for this
2nd Apr 2021, 1:14 AM
durian
durian - avatar