Re: forward declaration of class from another namespace
Sergey Lukoshkin <sergey.cpp@gmail.com> writes:
1. I got header "headerA.h" with the following code:
----------------------------------------
#include "headerB.h"
namespace A
{
class A
{
public:
create_b_ojects()
{
B* pB = new B( this );
}
};
}
-------------------------------------
2. And I got header "headerB.h" with the following code:
-------------------------------------------
namespace B
{
class B
{
public:
B(){}
B( /* here I need to use pointer to object of type A::A
*/ ){....}
};
}
-------------------------------------------
Question:
what is the correct way to make forward declaration of class A::A in
module B?
namespace A
{
class A;
}
namespace B
{
....
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]