Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
1
//g++ 7.4.0 #include <iostream> using namespace std; struct node { int data; node *next; }; class linked_list { private: node *head,*tail; public: linked_list() { head = NULL; tail = NULL; } void add_node(int n) { node *tmp = new node; tmp->data = n; tmp->next = NULL; if(head == NULL) { head = tmp; tail = tmp; } else { tail->next = tmp; tail = tail->next; } } }; int main() { linked_list a; a.add_node(1); a.add_node(2); return 0; } /* void printMenu(); // print out menu printMenu(); int main() { do { cout << "What action would you like to perform?" << endl; cin >> input1; switch (input1) { //add student record case 1: break; //display student records case 2: break; //count number of records case 3: break; //Quit case 4: for (int j = 0; j < memberList.size(); j++) { delete memberList.at(j); } break; case '?': //Display Menu printMenu(); break; default: cout << "Unknown action\n"; break; } } while (input1 != 'Q' && input1 != 'q'); // stop the loop when Q is read } // The method printMenu displays the menu to a user void printMenu() { cout << "Choice\t\tAction\n"; cout << "------\t\t------\n"; cout << "A\t\tAdd Member\n"; cout << "C\t\tCompute Pay\n"; cout << "D\t\tSearch for Member\n"; cout << "L\t\tList Members\n"; cout << "Q\t\tQuit\n"; cout << "?\t\tDisplay Help\n\n"; } } */
run
|
edit
|
history
|
help
0
RCP 27
find first non repeating
Speed
scope new delete
Sort 0's 1's 2's
Destroy It!
QuickDoubly
Rzutka gra 2
subset sum=k(Recursion)
OTHER - Two robots