why, switch works as a hash map. it doesn't check all elements. just jumps to the value.
but i need a clean code. that much switch cases feel like meh
that's why I said find a map implementation for C. there should be ton of them out there
find a header only library so you don't have to add a lot to your program
I am searching for one
https://github.com/oz123/awesome-c#hashing find more of these i guess
Обсуждают сегодня