Hi I think I'm missing something with this technique. Tried to follow examples but the following gives me an error: invalid use of incomplete type ‘class Citizen<T, minAge, maxAge, true>’
template <typename T, T minAge, T maxAge, bool isarmed>
class Citizen {
public:
Citizen(T health, T age);
Citizen(T health, T age, T attackPower);
T getAttackPower();
private:
T _health;
T _age;
T _attackPower;
};
template <typename T, T minAge, T maxAge>
T Citizen<T, minAge, maxAge, true>::getAttackPower() {
return _attackPower;
}