c++ - namespace problem?
- Jim Jennings (20/20) Mar 27 2003 I think this may be a problem.
I think this may be a problem. #include <iostream> namespace alpha { int a; }; namespace beta { using namespace alpha; void bee(); }; void beta::bee() { std::cout << a; } int main() { alpha::a = 10; beta::bee(); } std::cout << a; ^ ns.cpp(14) : Error: undefined identifier 'a' --- errorlevel 1
Mar 27 2003