Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Enter your code here
- template <typename T>
- Node<T>* SLL<T>::getNode(std::size_t ind)
- {
- if (ind >= size)
- {
- throw "Invalid index!";
- }
- Node<T> * j = front;
- for(std::size_t i = 0; i < size; i++)
- {
- j = j->getNext();
- i++;
- }
- return j;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement