我有 2 个二维数组。在某些时候,我需要选择两者之一并循环它。我需要什么样的指针指向二维数组才能循环它?
const char *a[] = {
"example1",
"example2",
NULL
};
const char *b[] = {
"example1",
"example2",
"example3",
"example4",
"example5",
NULL
};
const char *pointer = a;
int count = 0;
while(pointer != NULL)
{
puts(pointer[count]);
count++;
}