title: C++ for loops "Statement has no effect" warning?
body: <p>so I just started learning programming with C++ and I'm currently messing with basic console programs. I wanted to make a little spam program. here's the code :</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  string a;
  int b;
  
  void repetition(){
      cout &lt;&lt; "Please enter the number of time you want the text to be spammed" &lt;&lt; endl;
      cin &gt;&gt; b;
  }
  
  void text(){
      cout &lt;&lt; "Please enter the text you want to spam." &lt;&lt; endl;
      cin &gt;&gt; a;
  
      for(;b == 0;){
          cout &lt;&lt; a &lt;&lt; endl;
          b - 1;
      }
  }
  
  int main()
  {
      cout &lt;&lt; "Welcome to your auto-spammer!!" &lt;&lt; endl;
      repetition();
      text();
  
      return 0;
  
  }
  </code></pre>
  
  <p>I'm getting a warning saying "statement has no effect" for my for statement at line 20. I wanted to know why and how I could fix this. Thank you.</p>