As the title might look very confusing, let me give you an example:
typedef bool foo[2];
typedef foo bar[4];
bar what_am_i;
So, is what_am_i a [4][2] dimensional array as I presume, or a [2][4] dimensional array?
When you don't know the type of a variable, one of the easy ways is this trick:
template<class T> struct tag_type{using type=T;};
template<class T> constexpr tag_type<T> tag{};
then do this:
tag_type<void> t = tag<some_type>;
almost every compiler will spit out a reasonably readable "you cannot assign tag_type<full_unpacked_type> to tag_type<void>" or somesuch (presuming your type isn't void that is).
You can also verify you have a good guess with
tag_type<your_guess> t = tag<some_type>;
sometimes you'll want to generate some_type via decltype(some_expression).
cout << typeid(what_am_i).name()—after piping through c++filt, it reports bool [4][2].