0
4

1 回答 1

0

If it doesn't find the operator>> in the namespace it is called from, the compiler looks for the operator in namespaces associated with the parameters you use. In this case they all come from namespace std, and not from the global namespace. Therefore the global namespace is not searched.

When you explicitly call ::operator>>(istream, array), it does look in the global namespace (as you specifically asked it to).

于 2012-06-23T01:03:29.703 回答