I have read in a file and it counts the frequencey of the lettters and grammar used as I wanted. But this waa using a map which I can't order and so I have tried to transfer it over to a vector to order it in order of which letters/grammar are most frequent. I am having a problem in ordering this and tried to use the function().
// SymbolFreq.cpp : Defines the entry point for the console application.
//
The code runs fine and prints all of the letters and frequencies but they are unordered. So I have tried to convert the map into a vector to order it. I think the method I am using could work its just Im unsure how to code the function() correctly.
Why do you need this part? If you are ordering them by frequency (i.e the value, not the key), those won't help you at all, they will hinder you from sorting by values every-time, only exception being when they are equal (that means never because you got unique keys)
1 2
if (i.first < j.first) returnfalse;
if (j.first < i.first) returntrue;
I am trying to order code (from Chervil) into classes but I am having trouble successfully doing it and was hoping somebody would be able to point me in the right direction?