Friday, July 15, 2011

Assignment 4 - #6

for( int i=0; i < songs.length(); i++){
foundIndex = songs.indexOf(searchText, i);

if(foundIndex > 0)
  {
   count = count + 1;
   i = foundIndex + 1;
   foundIndex = 0;
  }
}

No comments: