title: how to use next_permutation
body: <p>I'm trying to get an arrangement of tic tac toe boards. So I have the following code:</p>
  
  <pre><code>// 5 turns for x if x goes first
  std::string moves = "xxxxxoooo";
  
  do {
      std::cout &lt;&lt; moves &lt;&lt; std::endl;
  } while ( std::next_permutation(moves.begin(), moves.end()) );
  </code></pre>
  
  <p>But it only outputs the original string once. I'm assuming that each character has to be unique. What's a way I can do this?</p>