关于命名空间的互相引入的例子

#include <cstdlib>
#include <iostream>
namespace mystd{
  extern "C" int printf(...);
  using namespace std;          
}
int main(int argc, char *argv[])
{
    mystd::cout<<"hellowrld";
    mystd::printf("helloworld!");
    
    system("PAUSE");
    return EXIT_SUCCESS;
}

 

你可能感兴趣的:(命名空间)