www.digitalmars.com         C & C++   DMDScript  

c++ - 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
Mar 27 2003