This is probably very simple, but I am trying to make something with has a variable defined like this:
char *temp[50];
And to change it I am doing things like:
strcpy(temp[1],"Hi");
However this segmentation faults.
I tried &temp[1], however this does not work. Could anyone point me in the right direction.
Edit: after reading comments and answers, I have decided to post some more information.
What I am trying to do is have 50 chars (so I could put char *temp1, char *temp2, etc) only in one, so it would go from char *temp1, char *temp2, etc to char *temp[50]
use malloc() or fixed 2d array(actually 1d).