티스토리 뷰
<10/27>
1. 10.1 객체들의 관계 Object Relation
- 구성(요소)(composition)
- 집합(aggregation)
- 연계(association)
- 의존(dependency)
2. 10-2 구성 관계 composition
- Monster <=> Postion2D
- #pragma once??
== #ifndef 구문과 비슷한 역할인데 표준은 아닌듯
http://abipictures.tistory.com/189
- undefined reference to `std::allocator<char>::allocator()'
갑자기 이런식의 에러가 나길래 뭔가했더니 gcc로 컴파일해서그럼 g++ 로했어야함.
3. 10-3 집합 관계 aggregation
- Lecture , students, teachers
- 객체를 다른 클래스에서 포인터 멤버로 받아서 함께 쓴다!
4. 10-4 제휴 관계 association
- 전방선언
- error: invalid use of incomplete type ‘class Doctor’
friend 랑 전방선언 다해줘도 이런 오류가 난다.
== 메서드를 아예 밖으로 빼준다.
5. 10-5 의존 관계 dependencies
6. 10-6 컨테이너 클래스 container class
'technote > C++' 카테고리의 다른 글
따배씨 11-3 ~ 11-5 (0) | 2018.11.17 |
---|---|
따배씨 11-2 (0) | 2018.11.01 |
따배씨 11.1 (0) | 2018.11.01 |
따배씨 9-9~ 9-12 (0) | 2018.10.26 |
따배씨 9-5 ~ 9-8 (0) | 2018.10.24 |
댓글