-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLinkedlist_Node.cpp
More file actions
39 lines (31 loc) · 811 Bytes
/
Linkedlist_Node.cpp
File metadata and controls
39 lines (31 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "Linkedlist_Node.hpp"
//Constructor
//
Linkedlist_Node::Linkedlist_Node( string word , int dictionary_index , int total_ascii ) {
//Initialize all member variables to avoid naming collision.
this->word = word;
this->dictionary_index = dictionary_index;
this->next_ptr = nullptr;
this->total_ascii = total_ascii;
}
//Destructor:
//
Linkedlist_Node::~Linkedlist_Node() {
}
//Member functiorns:
//
string Linkedlist_Node::get_word() {
return this->word;
}
int Linkedlist_Node::get_index() {
return this->dictionary_index;
}
Linkedlist_Node* Linkedlist_Node::get_next_ptr() {
return this->next_ptr;
}
void Linkedlist_Node::update_next_ptr( Linkedlist_Node *ptr ) {
this->next_ptr = ptr;
}
int Linkedlist_Node::get_total_ascii() {
return this->total_ascii;
}