Possible Duplicate:
Trouble with returning a string from function
Can a local variable’s memory be accessed outside its scope?
I'm trying to use a function to modify the value of a String pointer. I declared a struct called someStruct, and one of the fields is a pointer to a string, named 'valu'. Here's what I did:
void func(char* nvalue,someStruct* container){
char temp[strlen(nvalue+1);
temp=strcpy(temp,nvalue);
container->valu=temp;
return;
Will this function modify the value of the container to be nvalue? If not, how can I do it? I'm really not good with C so any help would be nice! Thank you