K
kevin_g_frey
Hello All,
I have effectively the following (part of a much bigger header):
namespace X
{
namespace Y
{
__gc public class EnvironmentList
{
// rest of declaration
};
__gc public class AnotherClass
{
public:
__property EnvironmentList* get_EnvironmentList( ); // **!**
private:
EnvironmentList* p_EnvironmentList; // **!**
};
} // namespace Y
} // namespace X
When I compile this the two lines marked **!** produce error C2327
saying that "X::Y::AnotherClass::EnvironmentList" is not a type name,
static, or enumerator.
I can get around this by fully qualifying the type (eg.
X::Y::EnvironmentList) in each case, but would prefer not to do so
because I have other cases which work perfectly (different class names
however).
I thought this might be due to an ambiguity with an existing class
named EnvironmentList in another namespace, but cannot find any
reference to such in MSDN. In addition, I tried a simple test
application to show how CL reports ambiguities and it seems to report
them correctly.
Any help appreciated...
I have effectively the following (part of a much bigger header):
namespace X
{
namespace Y
{
__gc public class EnvironmentList
{
// rest of declaration
};
__gc public class AnotherClass
{
public:
__property EnvironmentList* get_EnvironmentList( ); // **!**
private:
EnvironmentList* p_EnvironmentList; // **!**
};
} // namespace Y
} // namespace X
When I compile this the two lines marked **!** produce error C2327
saying that "X::Y::AnotherClass::EnvironmentList" is not a type name,
static, or enumerator.
I can get around this by fully qualifying the type (eg.
X::Y::EnvironmentList) in each case, but would prefer not to do so
because I have other cases which work perfectly (different class names
however).
I thought this might be due to an ambiguity with an existing class
named EnvironmentList in another namespace, but cannot find any
reference to such in MSDN. In addition, I tried a simple test
application to show how CL reports ambiguities and it seems to report
them correctly.
Any help appreciated...