>>3336951>>3337046I would hold even more respect for you if you leave it as a "generic" function. In the general sense, not in the C++ sense.
Then, you will have truly understood that your code if just a vehicle for your procedural thoughts.
But then I would have named the main function something other than "main," such as "beBeatani()". Ahh, who gives a crap.