I have a class declaration I will use many times with different values for Titles and Values
class Generator
{
public:
String Titles[9];
int16_t Values[9];
byte MainSel;
void SetTitles(String names[9])
{
for (i = 0; i < 9; i++)
Titles[i] = names[i];
}
void Update_Display()
{
Display(__func__, Titles, Values, MainSel);
}
};
I declare an instance of it and try to set the Titles using SetTitles
Generator Organ_Levels;
Organ_Levels.SetTitles("", "Rot", "Tone", "Sprd", "Bal", "Upper", "Lower", "Pedal", "Volume");
But the compiler seems to think I am passing char arrays :
No matching function for call to 'Generator::SetTitles(const char [1], const char [4], const char [5], const char [5], const char [4], const char [6], const char [6], const char [6], const char [7])'
Why doesn't it take them as instances of the Arduino String type?
String?Tthat's not the c++ standard implementation.