0
actual meaning of scope resolution operator
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
}
+ 1
scope resolution operator is used to call any variable or function that is declared globally or in other function part