|
If you want to modify info[0].value[0], then you have to pass the address in and dereference that pointer within the function:
[code]
void addValue(char **info,char *value )
{
int size=strlen(value)+1;
*info= (char *)malloc(size);
strcpy(*info,value);
}
void test()
{
addValue(&(info[0].value[0]),"Inspiron");
}
Again: why do you want to do this?
Also, what about posVal?
|