title: The compiler complains with "Error: stray '\240' in program"
body: <p>It is wanted of me to implement the following function:</p>
  <pre><code>void calc ( double* a, double* b, int r, int c, double (*f) (double) )
  </code></pre>
  <p>Parameters a, r, c and f are input and b is output. “a” and “b” are two-dimensional matrices with “r” rows and “c”
  columns. “f” is a function pointer which can point to any function of the following type:</p>
  <pre><code>double function‐name ( double x ) {
      …
  }
  </code></pre>
  <p>Function <code>calc</code> converts every element in matrix a, i.e., aij, to bij=f(aij) in matrix b.</p>
  <hr />
  <p>I implement the <code>calc</code> function as follows, and put it in a program to test it:</p>
  <pre><code>#include &lt;stdlib.h&gt;
  #include &lt;iostream&gt;
  
  using namespace std;
  
  double f1(double x){
      return x * 1.7;
  }
  
  void calc (double* a, double* b, int r, int c, double (*f) (double))
  {
      double input;
      double output;
  
      for(int i=0; i&lt;r*c; i++)
      {
          input = a[i];
          output = (*f)(input);
          b[i] = output;
      }
  }
  
  int main()
  {
      // Input array:
      int r=3;
      int c=4;
      double* a = new double[r*c];
      double* b = new double[r*c];
  
      // Fill &quot;a&quot; with test data
      //...
  
      for (int i=0; i&lt;r*c; i++)
      {
          a[i] = i;
      }
  
      // Transform  a to b
      calc(a, b, r, c, f1);
  
      // Print to test if the results are OK
      //...
  
      for (int i=0; i&lt;r*c; i++)
      {
          b[i] = i;
      }
  
      return 0;
  }
  </code></pre>
  <p>The problem is, I can't compile it. This is the output of <em>DevC++</em> when I click on <em>Compile and Execute</em> button:</p>
  <p><a href="https://i.stack.imgur.com/qdeYn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qdeYn.jpg" alt="Compilation errors referring to invalid characters" /></a></p>
  <p>What's wrong?</p>
  <p>I appreciate any comment to make the implementation more efficient.</p>