is it necessary to include base class in the header and or .cpp file of derived class?
MRehanQadri
0
Junior Poster in Training
Recommended Answers
Jump to PostUse this as an example:
base class//base.h #ifndef BASE_H #define BASE_H class Base { int foo; public: Base(int number) : foo(number) {} }; #endif
derived class
//derived.h #ifndef DERIVED_H //<- inclusion gaurding #define DERIVED_H #include "base.h" //<- this adds the code from …
All 4 Replies
NathanOliver
429
Veteran Poster
Featured Poster
MRehanQadri
0
Junior Poster in Training
NathanOliver
429
Veteran Poster
Featured Poster
MRehanQadri
0
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.