I have an overloaded function called createValue
:
void createValue(string, string);
void createValue(string, int);
void createValue(string, double);
void createValue(string, bool);
When I call the method obj->createValue("string name", "string value");
, it calls the createValue(string, bool);
overload and stores my string as a boolean.
I have changed that overloaded function to use char const*
instead of just string
and it works but I would like to know why this happened?