Skip to content

Instantly share code, notes, and snippets.

@easleyschool
Created October 10, 2019 17:52
Show Gist options
  • Save easleyschool/1128e7aa118a8668341cc1c5251127af to your computer and use it in GitHub Desktop.
Save easleyschool/1128e7aa118a8668341cc1c5251127af to your computer and use it in GitHub Desktop.
class node {
private:
// actual data, that is stored in the single element
int data;
//pointer to the next node
node* next;
public:
// default initialization
node() {
data = 0;
next = NULL;
}
// initialization with the new value
node(int x) {
data = x;
next = NULL;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment