0

actual meaning of scope resolution operator

15th Aug 2016, 8:17 PM
Bishal Nath
Bishal Nath - avatar
2 Réponses
+ 4
The scope resolution operator ( :: ), is used to tell the program what function is part of what class (if you do functions outside the class). Example: myClass.h: myClass { public: myClass(); void func(); }; myClass.cpp: #include "myClass.h" myClass::myClass() { //code for constructor } void myClass::func() { //code for function }
15th Aug 2016, 9:25 PM
Cohen Creber
Cohen Creber - avatar
+ 1
scope resolution operator is used to call any variable or function that is declared globally or in other function part
16th Aug 2016, 3:32 AM
Aman gautam
Aman gautam - avatar