How do I use the c_str() to convert my strings to an array? I can't seem to figure that out, so right now i'm going to try to index the string as is.
So far I'm trying something like this in the remove_str function, but I can't seem to quite grasp it. Am I headed in the right direction with this? If not, give me a suggestion and I'll try it out from there. Thanks
Code:
int remove_string(char* in_str, string remove_str)
{
for (int i = 0; i != (in_str.length()); i++)
{
if (strcmp(in_str[i],remove_str[i]);
in_str.erase(i,sizeof(remove_str));
}
cout << "new in_str is: " << in_str << endl;
return 0;
}