Skip to main content
Code Review

Return to Revisions

2 of 2
replaced http://stackoverflow.com/ with https://stackoverflow.com/

I didn't check everything yet but here are already some remarks:

  1. Your example lacks the include of <string> so it doesn't compile this way.
    Pretty obviously a copy and paste problem ;-)
  2. Use the same types in for loops.
    Currently you are comparing int i against the size_t return value of string::size().

    e.g. for (int i = 0; i < letters.size(); ++i) should be for (size_t i = 0; i < letters.size(); ++i)

    This might not look like a big deal but it will prevent you from unwanted or undefined behaviour.
  3. The last parameter of getLetterCombos could be passed as const reference instead of copying the value on every call.
default

AltStyle によって変換されたページ (->オリジナル) /