Posts
Showing posts from May, 2021
Link list using C++ improved version 2021
- Get link
- X
- Other Apps

Link list using C++ improved version 2021 source code: #include<iostream> using namespace std; class Node { private: int object; Node * nextNode;//address of next node public: int get() { return object; }; void set(int object) { this->object = object; }; Node * getNext() { return nextNode; }; void setNext(Node * nextNode) { this->nextNode = nextNode; }; }; ////////////////////list class////////////////// /* The List class */ class List { public://methods or function //declare the functions List(); //constructor void add (int addObject); //add new object int get(); //get node bool next(); friend void traverse(List list); friend List addNodes(); //add new node //// // position currentNode and lastCurrentNode at first element void start() { ////headNode currentNode lastCurrentNode ...