March 27, 2003 namespace 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 |
Copyright © 1999-2021 by the D Language Foundation