Modify a char when passed to a function
Posted on 2004-09-26
Ah hello. Bit like a similar question I have asked, but I need an answer to this soon:
using namespace std;
void Test(char* t)
int main ()
char str = "This is a string";
cout << str << endl;
I would like to modify str by passing it to Test. Now obviously it will not work with the parameters as-is.
What do I need to change Test to be to make the modification to the char ? I know I could do it if str was a char*, but with it being char it has confused me.