title: loop through an array in c++
body: <p>I want to loop through an array that I have that has a max value of 1000. I am filling the array with values from a text file. I am trying to loop through that array but in my for loop, I do not know the length of the array, so I do not know what to put in the second part of the for loop statement. For example: I have an array called: <code>int scores[1000];</code> and I am trying to iterate through this array and putting scores in a grade category. So A = 90-100, B = 80-89, C = 70-79, D = 60-69, F = 0-59.</p>
  
  <p>So I dont know what my for loop would look like:</p>
  
  <pre><code>for(int i = 0; i &lt; ...; i++){
  
  if(scores[i] &gt; = 90 || scores[i] &lt;= 100){
  
  //Do stuff...
  
  }
  </code></pre>
  
  <p>I guess I am also confused as to how to get the total counts of each category at the end too. But for the most part its how to iterate through this array. I know sizeof(scores[]) wont work because that will give me the int size and not the length of the array itself. Thanks though in advance! </p>