Using namespace will be written in the body of the function, in order to avoid namespace collisions

When using namespace xxx written in the body of the function, the resource defined in the namespace xxx valid only in the body of the function.

Test code shown below (namespace std function only valid in testFun2):

 

Guess you like

Origin www.cnblogs.com/dhqy/p/11459806.html