템플릿 <<연산자 오버로딩이 궁금합니다.
template class Node { public: Node() : next(nullptr), prev(nullptr) {} bool operator(Node N) { return N.data > data; } template friend ostream& operator& N) { os * next; Node* prev; friend class LinkedList; }; 다른print 함수{cout를 연산자 오버로딩 앞에 붙여봐도 [ C2995 'std::ostream &operator &)': 함수 템플릿이 이미 정의되었습니다. ] 이런 오류가 발생하구요. 템플릿 타입을 <<로 어떻게 출력하나요??
Loading...