How do I replace character's in a char array. I have tried using the STD namespace and that doesent seem to be working. Can anyone help me?
Printable View
How do I replace character's in a char array. I have tried using the STD namespace and that doesent seem to be working. Can anyone help me?
Use the STL replace:
My C++ is a little rusty. :oCode:char[] str = "i like vb";
replace( str, str+strlen(str), ' ', '' );
cout << str;