title: Returning array pointer produces "warning: return from incompatible pointer type"
body: <p>I was reading around C and I saw that you cannot return an array from a function but you can return a pointer, from this source: <a href="http://www.tutorialspoint.com/cprogramming/c_return_arrays_from_function.htm" rel="nofollow">Link</a>.</p>
  
  <p>The compiler gives this warning:</p>
  
  <pre><code>test.c:50: warning: return from incompatible pointer type
  </code></pre>
  
  <p>I wrote similar code to they gave but I'm receiving a </p>
  
  <pre><code>/*¯¯¯Input to Values¯¯¯*/
  int * lineToXY(char line[]) {
      int i,j,k;
      double x,y;
      char xvalue[15];
      char yvalue[15];
      static double xypair[2];
      /*Split into two strings*/
      for (i=0;sizeof(line)&gt;i;i++) {
          if (isValidChar(line[i])) {
              for (k=0;isValidChar(line[i+k]);k++) {
                  xvalue[k] = line[i+k];
              }
              break;
          }
      }
      for (i=i+k;sizeof(line)&gt;i;i++) {
          if (isValidChar(line[i])) {
              for (k=0;isValidChar(line[i+k]);k++) {
                  yvalue[k] = line[i+k];
              }
              break;
          }
      }
      /*Parse each string as a double*/
      x = strtod(xvalue, NULL);
      y = strtod(yvalue, NULL);
      xypair[0] = x;
      xypair[1] = y;
      return xypair; /*&lt;-------- this is the line which the compiler is referring to.*/
  }
  </code></pre>
  
  <p>The code above is from this: <a href="http://pastebin.com/jU48qypV" rel="nofollow">http://pastebin.com/jU48qypV</a></p>
  
  <p>Thanks in advance, and hope you all had a lovely Christmas.</p>