Hello all!
(tl;dr: getting this error: Cannot Declare Variable To Be of Abstract Type)
I’ve been attempting to modify @Robert_Atkins ’ excellent mode selector and matrix code (Thanks, Robert!) to incorporate a fire effect as one of the patterns, but I keep getting the error listed below. What is particularly vexing is that the Perlin structure seems to be identical but I get no errors when it is the only pattern (i…e, I comment out everything else).
I’ve attempted to understand the issue, and the advice I’ve read elsewhere is along the lines of: “If you inherited from an abstract class, you need to implement all the virtual members in order to be able to define an instance of it.” But I admit to being a c++ novice and don’t fully understand why it’s happening with this particular pattern and not the other’s I’ve posted.
Any help would be hugely appreciated. Thank you!
All the code is here: GitHub - martyzorro/Vest2018_Test
And here’s the error, which appears in Vest2018v02.ino:
*****
Vest2018v02:46: error: cannot declare variable ‘fire’ to be of abstract type ‘Fire’
Fire fire(leds);
^
In file included from /Users/martyzorro/Documents/Arduino/Vest2018v02/Vest2018v02.ino:8:0:
/var/folders/0s/m5rrnypd32d3qcfvvhq6fggc0000gq/T/arduino_build_505951/sketch/Fire.h:11:7: note: because the following virtual functions are pure within ‘Fire’:
class Fire : public Effect {
^
In file included from /Users/martyzorro/Documents/Arduino/Vest2018v02/Vest2018v02.ino:4:0:
/var/folders/0s/m5rrnypd32d3qcfvvhq6fggc0000gq/T/arduino_build_505951/sketch/Effect.h:32:18: note: virtual bool Effect::blankEveryFrame()
virtual bool blankEveryFrame() = 0;
^
cannot declare variable ‘fire’ to be of abstract type ‘Fire’
*****