title: How to get last index of a string array in C++
body: <p>I am naive programmer in c++ and just started learning c++ by solving problems.
  Please let me know if there is any old link or source where i can get the answer of below question.</p>
  
  <p>I have string array and i need to parse it till the last element but I don't know what condition I will put to check that loop has reached the last element in array.</p>
  
  <p>For example </p>
  
  <pre><code>int fun1(string members[]){
      int i=0;
       for(i=0;END_CONDITION;i++){
           /*Do some work*/
       }
  }
  </code></pre>
  
  <p>And member is something like this</p>
  
  <pre><code> string members[] = 
   {"BETTY F M A A C C",
    "TOM M F A D C A",
    "SUE F M D D D D",
    "ELLEN F M A A C A",
    "JOE M F A A C A",
    "ED M F A D D A",
    "SALLY F M C D A B",
    "MARGE F M A A C C"};
  </code></pre>
  
  <p>I have tried to search alot to get the answer but i could't find any answer which can help. 
  In most of thread guys are saying to use vector instead of string array. But here i am getting argument as string array.</p>