Posted By

ultamatewarrior on 03/18/10


Tagged


Versions (?)

example


 / Published in: C++
 

  1. class IntNode
  2. {
  3. public:
  4. IntNode( ){}
  5. IntNode(int theData, IntNode* theLink)
  6. : data(theData), link(theLink){}
  7. IntNode* getLink( ) const { return link; }
  8. int getData( ) const { return data; }
  9. void setData(int theData) { data = theData; }
  10. void setLink(IntNode* pointer) { link = pointer; }
  11. private:
  12. int data;
  13. IntNode *link;
  14. };
  15. typedef IntNode* IntNodePtr;

Report this snippet  

You need to login to post a comment.