I am writing a code about input strings, then compare them with other elements in the vector and, if there's a positive match, don't put them into. I wrote this:

```
    // NamePair.cpp : definisce il punto di ingresso dell'applicazione console.
//

#include "stdafx.h"
#include "std_lib_facilities.h"
#include <vector>

int _tmain(int argc, _TCHAR* argv[])
{
    vector<string> names;
    vector<int> scores;
    string name = "0";
    int score = 0;
    int error = 0;
    int n = 0;

    cout << "Type a name and a score: " << endl;

    while (cin >> name >> score) {
        ++n;
        cout << "This is # " << n << " name you typed." << endl;
        if (n >= 2) {
            for (int i : scores) {
                if (names[i] == name) {
                    cout << "You have already typed this name dude!" << endl;
                }
                else if (name != "NoName") {
                    names.push_back(name);
                    scores.push_back(score);
                }
                else {
                    break;
                }
            }
        }
    }

    for (int i = 0; i < scores.size(); ++i) {
        cout << names[i] << "\t" << scores[i] << endl;
    }

    keep_window_open();

    return 0;
}

```

The issue is that when I am trying to run the program it works but it seems to be stuck at a point where I continuously add names and scores but it doesn't do anything apparently (neither shows a warning message nor stops if "NoName" string is typed). I can't figure out why! I have tried to re-write it all but with the same result...

Thanks for help!