https://learnprogramming.in.net/create-a-frequency-counter-c-plus-plus/