Comparing numbers in a file to a console input
<p>I am trying to write a program to read in a number from the console, and then read an arbitrary number of numbers from a file.  It should then print out how many times the console number appears in the list read from the file.  I am not sure how to do the second part can anyone help me with how to count how many times the number appears.  The only code I have so far is for the first part.</p>

<p>My idea for the second part was something like this:</p>

<pre><code> while(!inputfile.eof){
    if(inputfilenumber == consolenumber){
       counter = counter + 1;
  }
</code></pre>

<p>but I can't seem to put this into practice as I am not sure how it would work. </p>
