Ive declared it...
/////////////////////////////////////////////////////////////////////////////
// RSacmanSetupTree window
class RSacmanSetupTree : public CTreeCtrl
{
// Construction
public:
RSacmanSetupTree();
public:
static RSacmanSetupTree* m_spSacmanSetupTree;
// Attributes
I've created a function that returns it....
// This function returns a reference to a canal manager object.
RSacmanSetupTree& RSacmanSetupTree::GetSetupTreePtr()
{
return *m_spSacmanSetupTree;
//~maa~20011210
}
I've initialized it in the cpp file right above the constructor
RSacmanSetupTree * RSacmanSetupTree::m_spSacmanSetupTree= NULL;
But I can't use it! Shouldn't a pointer take and address or do I need to overload an operator??
////////////////////////////////////////////////////////////////////////////
// RAddSystemDlg message handlers
BOOL RAddSystemDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
this->m_spSacmanSetupTree = RSacmanSetupTree::GetSetupTreePtr();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
--------------------Configuration: SacmanSetup - Win32 Debug--------------------
Compiling...
RAddSystemDlg.cpp
D:\Data\VSS\CodeResearch\SacmanSetup\RAddSystemDlg .cpp51) : (error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'class RSacmanSetupTree' (or there is no acceptable conversion)
RSacmanSetupTree.cpp
Generating Code...
Error executing cl.exe.
SacmanSetup.exe - 1 error(s), 0 warning(s