But to be honest, I don't think the String class should be constructible from integers anyway, especially since the constructors aren't declared as 'explicit'.
Code from WString.h
String( const int, const int base=10);
String( const unsigned int, const int base=10 );
String( const long, const int base=10 );
String( const unsigned long, const int base=10 );
This allows for implicit type conversion from an integer to a string:
String s;
// This can be confusing, making programmers
// think s is an integer. The integer 100 is converted
// to a String and then assigned to the variables s.
s = 100;
// The same thing happens with functions.
void foo(String s)
{
\\ ...
}
// The integer 100 is implicitly converted to a String.
foo(100);
// The function call foo(100) is the same as
foo(String(100));
That was very helpful! I came across this bug today. So, is it possible to correct it? Is there a file a can change? Could you please explain the procedure?
Thanks