2
2005
Hi
If I have a class,
class CNode {
public:
CarNode() : m_pNext(0), m_ticketNum(0) {}
~CarNode();
private:
int m_ticketNum; // ticket number of car
CNode *m_pNext; // pointer to next node in stack
};
1) Can I do the following initialization? If not what modification is
needed?
CarNode() : m_pNext(0), m_ticketNum(0) {m_pNext = m_pNext = 0 ;}
2) Does the above means that I do Not need the following?
void CNode::CNode()
{ ...
}
Thanks
If I have a class,
class CNode {
public:
CarNode() : m_pNext(0), m_ticketNum(0) {}
~CarNode();
private:
int m_ticketNum; // ticket number of car
CNode *m_pNext; // pointer to next node in stack
};
1) Can I do the following initialization? If not what modification is
needed?
CarNode() : m_pNext(0), m_ticketNum(0) {m_pNext = m_pNext = 0 ;}
2) Does the above means that I do Not need the following?
void CNode::CNode()
{ ...
}
Thanks