0

what if i declare a parameter inside constructor which has private access specifier, would parameter also be private?

class myclass { private: myclass(int m){} };

13th Aug 2018, 2:21 PM
Arush Joshi
Arush Joshi - avatar
1 Réponse
+ 4
parameters are not affected by access specifiers, since you cant directly use a parameter outside of the method you are calling. all parameters are retained within the scope of the method
13th Aug 2018, 2:35 PM
StealthyTaco
StealthyTaco - avatar