I want to create a function that returns a C-style multidimensional array
int mArray[2][2];
int[][] mArray getArray();
so this does not work, and I don't know why. Any help would be appreciated.
From [dcl.funct]:
Functions shall not have a return type of type array or function, although they may have a return type of type pointer or reference to such things. There shall be no arrays of functions, although there can be arrays of pointers to functions.
You can, however, return a std::array instead:
std::array<std::array<int, 2>, 2> getArray();
You cannot return arrays by value because they do not copy implicitly (and because the standard says so). You should use std::array instead:
std::array<std::array<int,2>,2> fun();
std::array<std::array<int,2>,2> arr = fun();
There are not many reasons to use C-arrays over std::array nowadays, with the most common one probably being "because my teacher/prof/boss says so".
ints? Are you trying to implement an interface that's C-compatible? Are you interested in learning about the dusty corners of C++ syntax?