C++ typename in function definition
This bit of code if from an example for a linked list but I'm struggling
to understand the 2nd line of this function, could someone talk me through
it?
template <typename T>
typename List<T>::Node* List<T>::search(T d)
{
if(!head) return NULL;
Node* cur = head;
while(cur) {
if(cur->data == d) return cur;
cur = cur->next;
}
return NULL;
}
No comments:
Post a Comment