Array of char *
- by user353060
Hello,
I am having problems with array pointers. I've looked through Google and my attempts are futile so far.
What I would like to do is, I have a char name[256]. I will be 10 of those.
Hence, I would need to keep track of each of them by pointers.
Trying to create a pointer to them.
int main()
{
char superman[256] = "superman";
char batman[256] = "batman";
char catman[256] = "catman";
char *names[10];
names[0] = superman;
names[1] = batman;
system("pause");
return 0;
}
How do I actually traverse an array of pointers?