I need to create a struct with a 2D bool array as member, so I made it double pointer as shown below. No I have a problem whenever I try to assign 2D array object to this struct member, I receive a warning that It's incompitable pointer type. Is there anyway to assign it (Not copy because I don't have an object only double pointer as a struct member)
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
typedef struct
{
bool** object;
}entry_t;
bool testObject[3][6];
entry_t entry =
{
.object = testObject
};
The warning received
warning: initialization of '_Bool **' from incompatible pointer type '_Bool (*)[6]' [-Wincompatible-pointer-types]