you cant make it infinite, but you can restructure this so it looks nicer
make a map where you parse an integer value to a string name
#include <map>
#include <string>
int main() {
std::map<int, std::string> units = {
{1, "one"},
{2, "two"},
{3, "three"},
{4, "four"},
{5, "five"},
{6, "six"},
{7, "seven"},
{8, "eight"},
{9, "nine"},
{10, "ten"},
{11, "eleven"},
{12, "twelve"},
{13, "thir"}
{14, "four"}
{15, "fif"}
{16, "six"}
{17, "seven"}
{18, "eigh"}
{19, "nine"}
{20, "twenty"},
{30, "thirty"},
{40, "forty"},
. . .
};
}