C
cole.harvey
I thought namespaces could be used globally across files. For example:
File1.h
namespace foo {
typedef int test_type;
} // Note this not in any class just defined in File1
File2.h
#include "File1.h"
class bar {
foo::test_type m_data;
}
The complier says: foo is not declared in this scope. What is up?
Thanks
File1.h
namespace foo {
typedef int test_type;
} // Note this not in any class just defined in File1
File2.h
#include "File1.h"
class bar {
foo::test_type m_data;
}
The complier says: foo is not declared in this scope. What is up?
Thanks