title: C++ Possible to use a for loop int i = container?
body: <p>Hi I am currently trying out to do this but it doesn't parse.</p>
  
  <p>The code I have is:</p>
  
  <pre><code>    for (int x = 0; x &lt; key.length(); x++) {
          c = key.at(x);
  
      }
  
      for (int w = c; w &lt; ptl.length(); w += keyL) {
          cout &lt;&lt; str[w] &lt;&lt; endl;
      }
  </code></pre>
  
  <p>The key is gotten from argv[2] the input is "52314". What I want to do is to let the second forloop run with int w = 5, int w = 2, int w = 3, int w = 1, int w = 4. Is that possible?</p>
  
  <p>Anyhelp will be awesome.</p>
  
  <p>Thank You</p>