Linked List Example

Here is the code structure for the linked list:

class linked_list {
  public:
    linked_list(void);     // Constructor
    ~linked_list(void);    // Destructor

    void print(void);      // Prints Entire List
    void insert(int item); // Insert Function
    void remove(int item); // Remove Function
    bool search(int item); // Search Function
  
  private:
    linkedNode *first;     // Pointer to first node
};

class linkedNode {
  public:
    int data;            // Data held by this node
    linkedNode *next;    // Pointer to next node
};