Created
October 10, 2019 17:52
-
-
Save easleyschool/1128e7aa118a8668341cc1c5251127af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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