Use C style array initializers instead of C++ style array initializers.
Change str2num -> strtonum to be compatible with the strtonum function.