Mohamed Mamdouh
Mohamed Mamdouh

Reputation: 1

Private including header file

I have header file A that includes header file B to get functions but i want when include header A not access functions of header B.

Upvotes: 0

Views: 44

Answers (1)

R Sahu
R Sahu

Reputation: 206577

Here's one way to deal with the problem.

  1. Create file C.h. The contents of C.h must be minimized so that it only has what's absolutely essential for use in A.h
  2. Include C.h in A.h and B.h.

Upvotes: 1

Related Questions