#define N 10
int (*p)[N] = new int[N];
// or
typedef int TenInts[N];
TenInts *p = new TenInts;
Is this something the C++ language simply disallows? Are there any workarounds? (except std::vector as all I need is a dynamically allocated array with known compile-time size)\
I need new as I'm putting the static array inside a template that uses new, and the template accepts a generic type T. Consider, template<typename T> void f() {T *t = new T;}, where I want T to be a static array.