//: C04:Scoperes.cpp // From Thinking in C++, 2nd Edition // Available at http://www.BruceEckel.com // (c) Bruce Eckel 2000 // Copyright notice in Copyright.txt // Global scope resolution int a; void f() {} struct S { int a; void f(); }; void S::f() { ::f(); // Would be recursive otherwise! ::a++; // Select the global a a--; // The a at struct scope } int main() { S s; f(); } ///:~