Searching n-grams in a text file. (C++)