Reputation: 151
I'm trying to set an array to a string from another array. This is in C programming.
gates[gatenum]=&seperation[a+1];
where both a
and gatenum
are both ints. And both arrays are declared as:
char seperation[3000][100];
char *gates[100][10];
So basically what I'm asking is how can I set gates[gatenum]
to the string that is in seperation[a+1]
Thank you in advance
Upvotes: 0
Views: 64
Reputation: 7292
Drop the second dimension of gates.
char *gates[100];
Then you can assign gates[gatenum] = seperation[a+1];
Upvotes: 1