title: Skipping a word after comma in char array
body: <p>I need to skip a word after a comma in char array. My code is next:</p>
  <pre><code>#include &lt;iostream&gt; 
  
  int main()
  {
      char r1[] = &quot;Hello, listen to me. I want to ask, if you.&quot;;
      char del[] = &quot;, &quot;;
      int k = strlen(r1);
      int i = 0;
      while (i &lt;= k) {
          if (r1[i] == del[0]) {//Checking if there is a comma
              i++;
              if (r1[i] == del[1]) {//Checking if there is a space after co
                  while (r1[i] != del[1]) {//Looking for a next space to skip a word
                      ++i;
                  }
              }
          }
          else {//If no comma, just type a letter
              std::cout &lt;&lt; r1[i];
              ++i;
          }
      }
  }
  </code></pre>
  <p>But this does not work. I want to have an answer like: &quot;Hello, to me. I want to ask, you.&quot; So it just should skip word after comma, not including space.</p>
  <p>This code gives me just a code without commas: &quot;Hello listen to me. I want to ask if you.&quot;</p>
  <p>P.S. I need to do this as basic as i can because i am a beginner.</p>