I couldn't find answer of the exact question, since the condition is a bit more specific: How can i allocate array of struct pointers.
typedef struct COORDS
{
int xp;
int yp;
} coord;
coord** xy;
i want to allocate it like: xy[500][460] But it returns invalid memory error when accessing them.
newis a reserved word. Are you trying to allocate in heap or declare it in stack?newis only a reserved word in C++newis reserved in c++ but not in c (which this question is tagged). That being said, it's still a very good idea to avoid use of c++ keywords in c.