When the scope resolution operator :: is used as a unary prefix operator, the left-hand side is assumed to be the global scope. For example, std::cout and ::std::cout are equivalent. It's generally only used when the name in the global scope is shadowed by a name in a more local scope, as in your example above where showResult in ClassA wants to call out to the global scope function of the same name. Without the :: it would just be infinite recursion because it would call itself.
:: is the scope resolution operator.
If there is nothing on the left hand side of the ::, it refers to something declared in the global namespace, the global function showResult in your case.
Without the ::, it would have referred to the local (class) function.
In case you have functions (or variables, or classes, etc.) with the same name, the compiler chooses the right function to call following the name lookup rules, see http://en.cppreference.com/w/cpp/language/lookup