-
Notifications
You must be signed in to change notification settings - Fork 0
Method
Delton Hughes edited this page Apr 29, 2023
·
1 revision
Definition: Is a function within a class that manipulates the member variables and/or allows the user to use a the created structure in a variety of ways. Code Example:
void pushFront(int val) {
Node *temp = new Node(val);
if (head == NULL) { //when head equals null
head = temp;
} else {
temp->next = head; //The next two lines:
head->prev = temp; //These connect the nodes so we
head = temp; //do not lose the data (stitches together)
}
size++; //increment count
}
- Each term will have as follows: -> A definition on the term -> A code example some being in great detail if needed, for example a class example is going to be longer than a member variable. -> Lastly, a picture which in some way relates to the term but may also relate to other terms as well.