How to remove specific element from a list only one time in C++?
<p>I am trying to make a simple win32 console application in C++, that would count how many matches are with same scores.</p>

<p>Example:<br>
match one score is 1:1<br>
match two score is 1:1<br>
match three score is 1:2  </p>

<p>The program should print in the console this:<br>
There are 2 matches with score 1:1<br>
There are 1 matches with score 1:2</p>

<p>I have created "<code>match</code>" object.  </p>

<pre><code>class match
{   

 public:
    int hostScore;
    int guestScore;

    match();
   ~match();
    void input();//This method is to input data in the object.
};
</code></pre>

<p>Now I want to create function to count the matches with same score.</p>

<pre><code>void count(list&lt;match&gt; a)
{
     match game;
     int counter;

     do{
           game = a.front(); // I want to take the value of the first element in the list and assign it to "game".

           do{
                  a.deleteSpecificValueOnlyOneTime(game);// I want to delete list element with the value of "game" 1 time
                  counter++

           } while (I can DeleteSpecificValuesOneTime)

           cout&lt;&lt;"There are &lt;&lt;counter&lt;&lt;" matches with score &lt;&lt;game.hostScore&lt;&lt; ":" &lt;&lt; game.guestScore&lt;&lt;endl;
           counter = 0;

      } while (a != a.Empty();)// While a is not empty.
}
</code></pre>

<p>The idea is to take the value from the first element from the list, delete it one time, count it, and repeat the process until all elements with same values are deleted and to count how many time this happen.</p>

<p>Take the value of the n-th element and do the same.</p>