I am having trouble declaring pointer to 2d variable of chars...
const char * d1 [][2] =
{
{ "murderer", "termination specialist" },
{ "failure", "non-traditional success" },
{ "specialist", "person with certified level of knowledge" },
{ "dumb", "cerebrally challenged" },
{ "teacher", "voluntary knowledge conveyor" },
{ "evil", "nicenest deprived" },
{ "incorrect answer", "alternative answer" },
{ "student", "client" },
{ NULL, NULL }
};
char ( * ptr ) [2] = d1;
That is my code. Error I am getting is error: cannot initialize a variable of type 'char (*)[2]' with an lvalue of type 'const char *[9][2]' What is happening and how can I fix it? Thanks everyone. char ( * ptr ) [2] = d1;