I have a function which takes string as an argument, but while calling this function I am actually passing char * (not const char *). This function uses the argument and populate the private variable which is of string type.
In the product its showing some strange behaviour i.e. crashing once in a while (not always) in other function while accessing the string variable which is class variable. Just want to check if the issue is with the passing of the variable which is of char * type.
void myfunc(char * Id)
{
abc.fetchInfo(Id);
...
...
}
Definition of the fetchInfo
fetchInfo(std::string Id);