How to access member functions in c++? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to access member functions in c++?

20th Jan 2017, 6:48 AM
Akiti Bala
1 Answer
+ 9
If function is public then you can access it everywhere(using instance) to do it just use dot notation myClassInstance.doIt() If you have a pointer: myClassInstance->doIt() If it is STATIC function: MyClass::doIt() For members all the same
20th Jan 2017, 7:25 AM
WittyBit
WittyBit - avatar