How to solve matrix problem where values are set of string. I want to use pointer. Following is the warning:
"warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]"
char *country[]={"USA\n","UK\n","Chaina\n","Singapore\n","Scotland\n"};
for (int i =0; i <5; i++) {
printf("\n CHECK val=%s\n",country[i]);
}
char *(*cp)[5]=&country[2];
for (int i =0; i <3; i++) {
printf("\n POINTER val=%s\n",(*cp)[i]);
}