Return a CStringArray gives errors

Viewed 3370

Im trying to return a CStringArray: In my ".h" I defined:

    Private:
    CStringArray array;

    public:
    CStringArray& GetArray();

In . cpp I have:

    CQueue::CQueue()
    {
    m_hApp = 0;
    m_default = NULL;
    }


    CQueue::~CQueue()
    {

     DeleteQueue();
    }

    CStringArray& CQueue::GetArray()
    {

     return array;   
    }

From another file I'm trying to call it by:

    CStringArray LastUsedDes = cqueue.GetArray();

I guess it is because of the above line that I get the error:

   error C2248: 'CObject::CObject' : cannot access private member declared in class 'CObject'
1 Answers
Related