Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 26th, 2012  |  syntax: None  |  size: 0.51 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Absense of loop rendering code useless?
  2. for (int i = 0; i <= phrase.size(); ++i)
  3. {
  4.     cout << "Character at position " << i << " is: " << phrase[i] << endl;
  5. }
  6.        
  7. i < phrase.size()  // Given that you are starting from 0th index, I assume
  8.                    // that the valid array indexes are 0 to N-1
  9.        
  10. for (int i = 0; i < phrase.size(); ++i)
  11. {
  12.     cout << "Character at position " << i << " is: " << phrase[i] << endl;
  13. }
  14.        
  15. for (int i = 0; i <= phrase.size(); ++i)
  16.        
  17. for (int i = 0; i < phrase.size(); i++)