Hi Im new to making classes, so far everything has gone well, however I want to make a list of objects, and set the private variables of the objects with methods - setters... however arduino tells me that the member variable is not declared within this scope. I am able to set the variables from the constructor, so I just tried to do it the same way from a method
void setName(String name)
{
_name = name;
}
doing it from the constructor works:
MyClass::MyClass(int value, String name, String description)
{
_value = value;
_name = name;
_description = description;
}
whats wrong?