Advertisement
Iain_Barkley

Untitled

Nov 19th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. #ifndef LIST
  2. #define LIST
  3.  
  4.  
  5. using namespace std;
  6. /*
  7. struct ListItem {
  8. int year;
  9. double flow;
  10. };
  11. */
  12.  
  13. struct Node {
  14. int year;
  15. double flow;
  16. Node *next;
  17. };
  18.  
  19.  
  20. class Flowlist{
  21. public:
  22. Flowlist();
  23.  
  24. //Flowlist(const Flowlist& rhs);
  25.  
  26. //~Flowlist();
  27.  
  28. void insert(Node*);
  29.  
  30. Node* read_item(int);
  31.  
  32. //get_item();
  33.  
  34. //returns year in a particular node
  35. int get_year(int);
  36.  
  37. //returns flow in a particular node
  38. double get_flow(int);
  39.  
  40. bool year_exists(int);
  41.  
  42. void remove(int);
  43. private:
  44. Node *headM;
  45. Node *search;
  46. //void destroy();
  47.  
  48. Node* find_year(int);
  49.  
  50. //Deallocate all nodes, set headM to zero
  51.  
  52. //void copy(const Flowlist& source);
  53. }Flowlist;
  54. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement