mercredi 3 octobre 2018

C++ How to find the repeted value in the ?

I already found this link very helpful.. https://www.sitesbay.com/cpp-program/cpp-find-duplicate-elements-in-array

But i do not know how to find the repeated value in the map!! The value is in the int.

for (int i = 5; i < argc; i++){

ifstream file (argv[i]);

string input;

map < string, int > myFunction;

while (file >> input) {
myFunction [ input ] ++; }

map ::iterator it;

for (it = myFunction.begin(); it != myFunction.end(); it++) {
}

Aucun commentaire:

Enregistrer un commentaire