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):
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):