In class filter.h, I have the following forward declarations
template<class T> //Forward declaration due to circular dependency
class Agc;
class FixPt;
class QuantizerCmplx;
template<class T>
class Quantizer;
I get the following errors while compiling with g++.
../source/filter.h: In member function âint FarrowFilter<T>::filter_quantize()â:
../source/filter.h:1837: error: invalid use of undefined type âstruct QuantizerCmplxâ
../source/filter.h:12: error: forward declaration of âstruct QuantizerCmplxâ
error: invalid use of undefined type âstruct QuantizerCmplxâ
You're attempting to use the type after only forward declaring it. You cannot do this. Forward declaring only lets you use the type name in your code, it does not let you access members or create instances of that class. For that, you must define the entire class body.
error: forward declaration of âstruct QuantizerCmplxâ
This error is quite ambiguous. I have no idea what it could mean without seeing the code.
Overall, this sounds like an organization issue. Obligatory link: http://cplusplus.com/forum/articles/10627/ specifically section 4, which outlines a good method for organizing interaction between multiple classes.