I am currently programming my RGB LEDCube and can not solve the following error: C:\Program Files (x86)\Arduino\libraries\LEDCube/colorgnt.h:11:3: error: 'rgb8bit' does not name a type
/*
rainbowgnt.h
*/
#ifndef rainbowgnt_H
#define rainbowgnt_H
#include "LEDCube.h"
class colorgnt {
public:
colorgnt() {}
rgb8bit rgb(uint8_t position); //here does the compiler trow the error
};
#endif
/*
rainbowgnt.h
*/
#ifndef LEDCube_H
#define LEDCube_H
#include "colorgnt.h"
#include "LEDCube.h" //tried with an without
class LEDCube;
class rainbowgnt: public colorgnt {
public:
rainbowgnt() {}
rgb8bit rgb(uint8_t position) { //I think the compiler would throw an error as well if the error in
rgb8bit rgb; //line above would be solved
rgb.r = 255;
rgb.g = 255;
rgb.b = 255;
return rgb;
}
}
#endif
Why am I getting this error and how can I solve it?
Delta_G:
rgb8bit only exists inside the rainbowgnt class.
You could refer to it as rainbowgnt::rgb8bit.
BTW, check all your include guards. It looks like you copied from LedCube.h and have that same ifndef in two of your files. That will stop one from compiling.
I corrected the include guards, thanks.
But I do not really understand how you mean "You could refer to it as rainbowgnt::rgb8bit."