Advertisement
reellearning

Contact List Node Header

Jul 23rd, 2012
2,023
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. /*
  2.  * Contact.h
  3.  *
  4.  *  Created on: Jul 21, 2012
  5.  *      Author: Derek
  6.  *
  7.  *      Contact Node for a Linked List Example
  8.  */
  9.  
  10. #ifndef CONTACT_H_
  11. #define CONTACT_H_
  12.  
  13. #include <iostream>
  14. #include <string>
  15.  
  16. class Contact
  17. {
  18.     friend std::ostream& operator<<(std::ostream& os, const Contact& c);
  19.     friend class ContactList;
  20.  
  21.     public:
  22.  
  23.       Contact(std::string name = "none");
  24.  
  25.     private:
  26.       std::string name;
  27.       Contact* next;
  28. };
  29.  
  30.  
  31. #endif /* CONTACT_H_ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement