描述
有关C++ namespace的例子
代码
#include <iostream>
#include <string>
#include <vector>
namespace AAA
{
class B
{
public:
B();
~B();
void output();
};
}
AAA::B::B(){
}
AAA::B::~B(){
}
void AAA::B::output()
{
std::cout<<"example OK"<<std::endl;
}
int main(int argc, char** argv)
{
using v = AAA::B;
v xx;
xx.output();
return 0;
}