Guest User

Untitled

a guest
Jul 18th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3.  
  4.  
  5. class List {
  6. private:
  7.    
  8.     int length; //the number of elements on the list
  9.    
  10.     struct element
  11.         {
  12.         int *parr;
  13.         int size;
  14.         int key;
  15.         element *next;
  16.         }; 
  17.  
  18.     element *head;
  19.  
  20. public:
  21.      List(); //constructor
  22.     void removeElement(int key);
  23.     void insert(int how_large, int key);
  24.     void print();
  25.  
  26.     int get(int key, int index);
  27.     void set(int key, int index, int value);
  28.    
  29.    
  30.     }
  31.  
  32.  
  33.  
  34.  
  35. List::element()
  36. {
  37.  head=NULL;
  38.  length = 0;
  39.  }
Add Comment
Please, Sign In to add comment