Good Day,
I have a String Library which is great, but is missing many features that I need. I wish to extend it to add more functionality. The code for the String library "WString.h" is given in this link.
https://github.com/arduino/Arduino/blob/master/hardware/arduino/cores/arduino/WString.h
I wished to write new functions but dont want to modify WString.h as that is part of the library. Hence, I wrote something like this:
class StringW: public String{
public:
StringW();
};
However, upon doing this:
StringW myString="asd";
I get the error:
Error 1 conversion from 'const char [4]' to non-scalar type 'StringW' requested
Can I know why this occurs? My C++ knowledge is still quite flaky. Shouldn't the child class automatically inherit parent classes functions, including the = operator overload? How can I make my child class String class see the = operator in the parent class as part of the contructor?!