I've been working on a project the last few days. The program reads a txt file, stores each character in a multimap, and pairs with a number, that increments from 0 each time it reads a character into the map..(ex first letter a=0, second letter d = 1). This ends up being very inefficient once the program is told to read a large text file(I took a .txt version of an actual book and it took up a minute and 33 seconds to input into the mutlimap).
Any suggestions as to how I could make it more efficient?
Yes, I'm trying to count every character in the text file, and then that number has to be paired with the character for that number. I find the multimap works well because I just input the character and pair it with the number and then increment that number.
How would I pair it up with the character if I did it like that?