When trying to declare an abstract class, I don't seem to be able to have templated functions. Why is this, and how do I deal with it? Here is my example header file.
// Foo.h
#include "Bar.h"
#include "Baz.h"
class Foo
{
public:
Foo();
virtual Bar<Baz> *getBaz() const = 0;
//snip
};
Other compiler error from the same line includes
syntax error: missing ';' before '<'
I looks like it does not recognize Bar as a type.
Check your two header files and make sure:
1) That it is defined
2) The include guards are correct and it is not hidden.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With