Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C Question

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
}

Name: Anonymous 2011-02-26 22:28

>>9
You don't understand, do you? If you help them, they'll stay. They'll keep posting threads about the most basic programming questions and then they'll bring in their friends to do the same. And then this place will turn into /halp/. If you have such an urge to HELP THEM, just direct them to http://7chan.org/halp and help them there.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List