0

Inside a method isGood I want to use function isGood from the global namespace. How do I avoid to have isGood interpreted as the same method instead of the global function ?

bool isGood(){ return_if_it_is_good;}

class X{
int a;
bool isGood(){return isGood(a);}
}
George Kourtis
  • 2,381
  • 3
  • 18
  • 28

1 Answers1

2

Call with the :: operator :

bool isGood(){ return_if_it_is_good;}

class X{
int a;
bool isGood(){return ::isGood(a);}
}
Oragon Efreet
  • 1,114
  • 1
  • 8
  • 25