In C++ the same name can appear in different scopes: namespace, class, struct. So:
int someFunciton() {
// global scope
}
class A {
int someFunction() {
// in the scope of class A
// RIGHT HERE: How could you call the global function?
// Specify the scope of the function as in
::someFunction();
}
};
the full name of the inner function is A::someFunction. The :: with nothing in front of it refers to the global scope.
int someFunciton() {
// global scope
}
class A {
int someFunction() {
// in the scope of class A
// RIGHT HERE: How could you call the global function?
// Specify the scope of the function as in
::someFunction();
}
};
the full name of the inner function is A::someFunction. The :: with nothing in front of it refers to the global scope.
HTH, -bcl