I've looked at this similar question, but its not working.
Externally, in Filter.h I have
struct test{
unsigned char arr[3][8192][8192];
}
I have one of these structs initialized, and my code works properly if I use:
initialized_test_struct -> arr[2][54][343]
However, I want to cache a pointer to this array:
unsigned char (*new_ptr)[8192][8192] = &(initialized_test_struct -> arr)
assert initialized_test_struct -> arr[2][54][343] == new_ptr[2][54][343]
But when I try this, I get:
cannot convert ‘unsigned char ()[3][8192][8192]’ to ‘unsigned char ()[8192][8192]’ in initialization
When I try:
unsigned char (*colors)[3][8192][8192] = &(input -> color);
I get the wrong data type (when being used):
error: invalid operands of types ‘unsigned char [8192]’ and ‘char’ to binary ‘operator*’
How can I pull this off?