No matter what syntax I try, this code is always a compile error:
int (*foo)[3] = new ???;
I've tried
int (*foo)[3] = new (int[3]);
int (*foo)[3] = new (int(*)[3]);
int bar[3];
int (*foo)[3] = new decltype(bar);
No matter what syntax I try, this code is always a compile error:
int (*foo)[3] = new ???;
I've tried
int (*foo)[3] = new (int[3]);
int (*foo)[3] = new (int(*)[3]);
int bar[3];
int (*foo)[3] = new decltype(bar);
Well, it's easy.
int (*foo)[3] = new int[1][3];