Can anyone tell me what ":" this symbol used for | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 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 Réponse
+ 5
member initializer list..there is a lesson for this
2nd Apr 2021, 1:14 AM
durian
durian - avatar