Creating a replacement for the switch statement in C++ also working for strings | Hacker News Reader