0

I saw a post about this where they said to just change the configuration settings. I did this and the problem was solved. However I'm turning this program into a professor and I'm worried that it won't compile since I had to change a configuration setting (the conformance mode to no) for it to work. Is there another solution for this error? The error is happening on the line where I declare the temp Node.

template <typename T>
 ostream& operator<<(ostream& stream, const List342<T>& list) {
     List342<T>::Node<T>* temp;
     temp = list.head_;
    while (temp != nullptr) {
        stream << *temp->data;
        temp = temp->next;
    }
    return stream;
}
  • I did that and it still didn't work. Instead, i put my node structure outside of the class and then now it works fine without having to even declare it from the List342 class – huntington06 Nov 14 '21 at 05:37

0 Answers0