int value passed to function
hey guys
this is probably an easy question to answer, but i just dont get it.
i have a main method where i call a function parse: something like that:
Code:
int main()
{
char *newargv[MAXITEM];
int size;
parse(newargv, size);
printf("argvsize = %i\n", newargvSize);
}
int parse(char *newargv[], int newargvSize)
{
newargvSize = 0;
// loop where values are assigned to the newargv array and the size is increaded
// newargv[newargvSize] = some string;
// newargvSize++;
printf("newargvSize: %i\n", newargvSize);
}
now the printf statement in my parse method outputs the correct value, where as my printf after the function call returns some random value (an address i guess). what would i have to do to get the same value as in my function. i tried to work with pointers and stuff, but couldn't figure it out yet! :(
any help appreciated,
thx