Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
hgh
#include <iostream> using namespace std; class LinkedList; class Node { friend class LinkedList; private: int data; Node *next; }; class LinkedList { private: Node *head; public: LinkedList { head = 0; } ~LinkedList { Node *curr = head; Node * prev; while(curr!=0) { temp = curr->next; delete curr; curr = temp; } head = 0; } bool InsertAtStart(int val) { Node *temp = new Node; if(temp!=0) { temp->data = val; temp->next = 0; head = temp; return true; } else { return false; } } void display() { Node *curr = head; while (curr!=0) { cout << curr; curr = curr->next; } } }; int main() { cout << "Hello World" << endl; }
run
|
edit
|
history
|
help
0
RecursiveDivide
du
DCapSurfaceDesc
Increment pointer to struct
hangman
Visual Studio expand modified
hangman
bool behaviour (convertion/promotion) for logical and artihmetic operators
const reference life time extension
IBE FT ParseFileName