#pragma once #include using namespace std; class linkedList { private: class node { public: double data; node* next; }; //What variables does a linked list need? node* head; //Can keep other stuff if you want public: linkedList() { head = nullptr; } //Add x to the front of the list void addFront(double x) { node* baby = new node; baby->next = head; baby->data = x; head = baby; } void printList() { node* current = head; while (current != nullptr) { //print current value cout << current->data << endl; //move current ptr to next node current = current->next; } } };