a common cathode seven segment display library

Correct! Read from left to right the left most bit is unused with the other 'A', 'B', 'C', etc. to 'G' as the right most bit.

The secret (not really secret) is that the 'Arduino Language' is in fact, surprise, C++! And the compiler is in fact a version of the GNU C++ compiler.