Name: Anonymous 2011-02-26 21:22
How do i pass a character pointer to an array into another function so that function can manipulate it?
I have a c program with everything in the main method and i want to simplify it, but i cant successfully pass a char *[] to another function.
helper(char *p);
int main(){
char *p[100];
helper(p);
return 0;
}
void helper(char *p){
//do stuff with p[0],p[1], etc
}
I have a c program with everything in the main method and i want to simplify it, but i cant successfully pass a char *[] to another function.
helper(char *p);
int main(){
char *p[100];
helper(p);
return 0;
}
void helper(char *p){
//do stuff with p[0],p[1], etc
}