2005 wrote:
> I have two classes ( CNode & CAll ) and I created 2 objects for the
> latter class, CAll.
>
> CAll All_A, All_B;
>
> class CAll {
> public:
>
> ------
>
> private:
>
>
> CNode *m_pTop; // pointer to top of Allay (stack)
> int mSize; // number of nodes in Allay (stack)
> int mMaxSize; //max number of nodes in Allay (stack)
> };
>
> class CNode {
> public:
>
> ------
>
> private:
> int m_ticketNum; // ticket number of car
> CNode *m_pNext; // pointer to next node in stack
> };
>
> I have a pointer to All_B called *pB which I am expected to pass it to
> a function.
>
> I have trouble with *pB.
>
> I did the following in the code:
>
> CAll All_A, All_B; // initialize 2 objs All_A & All_B;
> All_B pB;
If pB is supposed to be a pointer to All_B, then I assume the above
line should be:
CAll* pB = &All_B;
Best regards,
Tom
|