// first version of a linked list class #include #include using namespace std; struct list_node { list_node(int init_data = 0, list_node * link = nullptr) { data = init_data; next = link; } int data; list_node * next; }; class linked_list { public: linked_list() { front = nullptr; back = nullptr; count = 0; } void add(int value) { if (count == 0) { front = new list_node(value); back = front; count = 1; } else { back->next = new list_node(value); count++; back = back->next; } } int size() const { return count; } private: list_node * front; list_node * back; int count; }; int main() { return 0; }