C++(따라하며 배우는 C++)

Chapter 10-5. 의존 관계

void_melody 2021. 10. 31. 21:00

main.cpp
worker.h
worker.cpp
timer.h

현재 class Worker는 class Timer을 사용함으로써 doSomething() 함수를 구현하고 있다.

class Timer는 ? class Worker가 쓰는지 안쓰는지 모른다.

즉 Worker는 Timer 클래스가 필요하므로, 의존관계이다.