글
friend ostream& operator<<(ostream& os,BinarySearchTree& bst) {
os<<"BinarySearchTree[SIZE:"<<bst.getSize()<<"]";
return os;
}
os<<"BinarySearchTree[SIZE:"<<bst.getSize()<<"]";
return os;
}
- 왜 friend 로 선언해야 하는가?
- friend 여서인가... 왜 자기 클래스의 private 멤버 변수를 읽지 못하는가?
RECENT COMMENT