title: "error: stray '\342' ", "stray '\200' ", "stray '\234' " in C compiling?
body: <p>I used <a href="https://en.wikipedia.org/wiki/Notepad%2B%2B" rel="nofollow noreferrer">Notepad++</a> to write the code, and when I tried to compile it (I used <code>cc lab7.c -o test1</code> to compile it) I got a bunch of stray \342, stray \200, stray \234 errors, as is seen below.</p>
  <p>Here is my code:</p>
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  
  char inbase, dummy, outbase;
  char response;
  int inputNum;
  char bin [32];
  
  int main(void)
  {
      // Perform for yes response
      while (response == 'y' || response == 'Y')
      {
          // Prompt to read in char for base of input
          printf(&quot;Enter a base to read in (b for binary, d for decimal,\n h for hexidecimal, or o for octal: &quot;);
          scanf(&quot;%c&quot;, &amp;inbase);
  
          // If binary is inbase
          if (inbase == 'b' || inbase == 'B')
          {
              printf(&quot;Enter a binary number to read: &quot;);
              scanf(&quot;%c&quot;, &amp;dummy);
              scanf(&quot;%s&quot;, bin);
              inputNum = binary(bin);
          }
  
          // If inbase is anything else, read
          else
          {
              printf(&quot;Enter an integer to read: &quot;);
              scanf(&quot;%c&quot;, &amp;dummy);
              scanf(&quot;%i&quot;, &amp;inputNum);
          }
  
          // Output the number
  
          printf(&quot;Enter a base to output as: &quot;);
          scanf(&quot;%c&quot;, &amp;dummy);
          scanf(&quot;%c&quot;, &amp;outbase);
  
          // decimal output
          if (outbase == 'd' || outbase == 'D')
          {
              printf(&quot;The integer %i in decimal is %d&quot; inputNum, inputNum);
          }
  
          // hexidecimal output
          if (outbase == 'h' || outbase == 'H')
          {
              printf(&quot;The integer %i in hexidecimal is %h&quot; inputNum, inputNum);
          }
  
          // octal output
          if (outbase == 'o' || outbase == 'O')
          {
              printf(&quot;The integer %i in octal is %o&quot; inputNum, inputNum);
          }
  
          // check to see if user wants to run again
          printf(“Do you want to …”);
          scanf(“%c”, &amp;dummy);
          scanf(“%c”, &amp;response);
          scanf(“%c”, &amp;dummy);
      }
  
      int binary(char* inString)
      {
          int sum=0;
          int i;
  
          for (i=0; i &lt; strlen(inString); i++)
          {
              sum = sum * 2 + (inString[i] - 48);
          }
  
          return sum;
      }
  
      return 0;
  }
  
  // END OF CODE
  </code></pre>
  <p>And here are the error messages I'm getting:</p>
  <pre class="lang-none prettyprint-override"><code>lab7.c: In function ‘main’:
  
  lab7.c:58:45: error: expected ‘)’ before ‘inputNum’
  printf(&quot;The integer %i in decimal is %d&quot; inputNum, inputNum);
                                           ^
  
  lab7.c:64:49: error: expected ‘)’ before ‘inputNum’
  printf(&quot;The integer %i in hexidecimal is %h&quot; inputNum, inputNum);
                                               ^
  
  lab7.c:70:43: error: expected ‘)’ before ‘inputNum’
  printf(&quot;The integer %i in octal is %o&quot; inputNum, inputNum);
                                         ^
  
  lab7.c:74:3: error: stray ‘\342’ in program
  printf(“Do you want to …”);
  ^
  
  lab7.c:74:3: error: stray ‘\200’ in program
  
  lab7.c:74:3: error: stray ‘\234’ in program
  
  lab7.c:74:14: error: ‘Do’ undeclared (first use in this function)
  printf(“Do you want to …”);
           ^
  
  lab7.c:74:14: note: each undeclared identifier is reported only once for                    each function it appears in
  
  lab7.c:74:17: error: expected ‘)’ before ‘you’
  printf(“Do you want to …”);
              ^
  
  lab7.c:74:17: error: stray ‘\342’ in program
  
  lab7.c:74:17: error: stray ‘\200’ in program
  
  lab7.c:74:17: error: stray ‘\246’ in program
  
  lab7.c:74:17: error: stray ‘\342’ in program
  
  lab7.c:74:17: error: stray ‘\200’ in program
  
  lab7.c:74:17: error: stray ‘\235’ in program
  
  lab7.c:75:3: error: stray ‘\342’ in program
  scanf(“%c”, &amp;dummy);
  ^
  
  lab7.c:75:3: error: stray ‘\200’ in program
  
  lab7.c:75:3: error: stray ‘\234’ in program
  
  lab7.c:75:13: error: expected expression before ‘%’ token
  scanf(“%c”, &amp;dummy);
           ^
  
  lab7.c:75:13: error: stray ‘\342’ in program
  
  lab7.c:75:13: error: stray ‘\200’ in program
  
  lab7.c:75:13: error: stray ‘\235’ in program
  
  lab7.c:76:3: error: stray ‘\342’ in program
  scanf(“%c”, &amp;response);
  ^
  
  lab7.c:76:3: error: stray ‘\200’ in program
  
  lab7.c:76:3: error: stray ‘\234’ in program
  
  lab7.c:76:13: error: expected expression before ‘%’ token
  scanf(“%c”, &amp;response);
           ^
  
  lab7.c:76:13: error: stray ‘\342’ in program
  
  lab7.c:76:13: error: stray ‘\200’ in program
  
  lab7.c:76:13: error: stray ‘\235’ in program
  
  lab7.c:77:3: error: stray ‘\342’ in program
  scanf(“%c”, &amp;dummy);
  ^
  
  lab7.c:77:3: error: stray ‘\200’ in program
  
  lab7.c:77:3: error: stray ‘\234’ in program
  
  lab7.c:77:13: error: expected expression before ‘%’ token
  scanf(“%c”, &amp;dummy);
           ^
  
  lab7.c:77:13: error: stray ‘\342’ in program
  
  lab7.c:77:13: error: stray ‘\200’ in program
  
  lab7.c:77:13: error: stray ‘\235’ in program
  </code></pre>