K
Kevin Grigorenko
Hello,
I have the definitions of classes A and B in a header file. Class A has a
private member of type B. Class B is defined after class A in the header
file. I place a forward declaration of class B above class A but VS.NET
still complains with:
error C2079: 'TextDB::TextDB::database_version' uses undefined class
'TextDB::TextDB_Version'
namespace TextDB
{
class TextDB_Version;
class TextDB
{
private:
TextDB_Version database_version;
};
class TextDB_Version
{
[...]
};
} // namespace TextDB
Is this because this is in a header file? I'm confused.
Thanks a lot,
Kevin Grigorenko
I have the definitions of classes A and B in a header file. Class A has a
private member of type B. Class B is defined after class A in the header
file. I place a forward declaration of class B above class A but VS.NET
still complains with:
error C2079: 'TextDB::TextDB::database_version' uses undefined class
'TextDB::TextDB_Version'
namespace TextDB
{
class TextDB_Version;
class TextDB
{
private:
TextDB_Version database_version;
};
class TextDB_Version
{
[...]
};
} // namespace TextDB
Is this because this is in a header file? I'm confused.
Thanks a lot,
Kevin Grigorenko