Hi all, this is my first post!
I'm pretty new to C and maybe this is a dumb question.
I've a function that accept a string as a parameter for modify it but it doesn't (I'm sure there is some logical mistake with pointers):
void doSomething(char *string)
{
string = "some string";
}
That I call whith this:
char *origString = NULL;
doSomething(origString);
printf("\n%s\n", origString);
And the output is:
<NULL>
So I suppose the there is something wrong in the assignement in the function but i cannot solve this.
Thanks for the help and sorry for my *very* bad english!
NiNTNEDU.