+ 3

Please

what's the difference between "." and ":" when we call a function in c++?

26th Jun 2018, 4:56 PM
Aboubacar Toukou Habi
Aboubacar Toukou Habi - avatar
3 ответов
+ 2
"." is used when we call function in object of a class. "::" is used when we implement the function. See the example: class MyClass { public: void MyFunction(); }; void MyClass::MyFunction() { ..... } int main() { MyClass object; object.MyFunction(); return 0; }
30th Jun 2018, 11:43 AM
B K