Utilizing std::map and std::array for displaying a modulus grid
main() can be defined lastly, so that the function prototypes can be removed.  This will also allow NUM_ARR_ELEMS to be initialized within main().  The size of either the inner or outer structure can still be accessed via size().
For simple input like this, a command line argument is another option:

int main(int argc, char *argv[])
{
    unsigned int mod;

    // only argument being the file name
    if (argc &lt; 2)
    {
        std::cin &lt;&lt; mod;
    }
    // more than the file name, where only the second is used
    else
    {
        mod = std::atoi(argv[1]);
    }
}


Warning: std::atoi() returns an int, but mod is an unsigned int.  As this is a mismatch (and should be reported by the compiler), something else should be changed.  Either the return value of std::atoi() should be cast to an unsigned int, or mod should just be changed to an int (and adjusted elsewhere).  The latter may be a better option here, and the extra unsigned bit really isn't important.  Input validation (to avoid a negative value) can be done as well.
This type is quite long to copy in different places:


std::map&lt;unsigned, std::array&lt;unsigned, NUM_ARR_ELEMS&gt;&gt;



so it can become a typedef:

typedef std::map&lt;unsigned, std::array&lt;unsigned, NUM_ARR_ELEMS&gt;&gt; Grid;

Prefer "\n" over std::endl for just a newline.  The latter also flushes the buffer.