friend ostream& operator<<(ostream& os,BinarySearchTree& bst) {
  os<<"BinarySearchTree[SIZE:"<<bst.getSize()<<"]";
  return os;
 }

- 왜 friend 로 선언해야 하는가?
- friend 여서인가... 왜 자기 클래스의 private 멤버 변수를 읽지 못하는가?

'2007년1학기 > C++프로그래밍' 카테고리의 다른 글

C++ 과제  (22) 2007.05.23
CPP 10장  (19) 2007.05.23
CPP 9장  (42) 2007.05.09
과제  (38) 2007.05.02
함수 오버로딩과 오버라이딩  (45) 2007.05.02
by cranix 2007. 5. 23. 11:40