I'm working from my knowledge of pointers... OK, so it's not possible. I didn't know that, I never actually tried. But a works, nevertheless, and which just compiles to a + sizeof(a) * 10. So why wouldn't 2D work?
Unless, of course, there is a way to cast that pointer to a type that is a 2D-pointer.
I disgress. Sometimes others can fill out what someone else cannot. We aren't perfect.
Otherwise, it's possible to do
*(p + sizeof(p) * x * y) = y
int& array(int* p, int x, int y)
return *(p + sizeof(p) * x * y);
int* p = new int;
array(p, 10, 2) = 50;