Here is a very simple example of what I am trying to do:
#include <stdio.h>
int main() {
char a[2][2][5] = { {"hello", "world"}, {"again", "test1"}};
a[1] = a[0];
printf("a[0][0]: %s\n", a[0][0]);
printf("a[0][1]: %s\n", a[0][1]);
printf("a[1][0]: %s\n", a[1][0]);
printf("a[1][1]: %s\n", a[1][1]);
}
I expect it to print:
a[0][0]: hello
a[0][1]: world
a[1][0]: hello
a[1][1]: world
Instead all I get is error: incompatible types in assignment
You cannot assign arrays, you should copy them (using memcpy or memmove)
Also, each of your string is of size 6, not 5 (there is an implicit null terminator).