title: incompatible types when returning type
body: <p>I have a problem on convertToPoint functions.</p>
  
  <pre class="lang-cpp prettyprint-override"><code>int convertToPoint(int argc, char *argv[]) {
    struct point p;
    int x, y;
  
    p.x = atoi(argv[1]);
    p.y = atoi(argv[2]);
  
    return p;
  }
  </code></pre>
  
  <p>Expect to return a struct of type point, but receive the follow error:</p>
  
  <p>error: incompatible types when returning type ‘struct point’ but ‘int’ was expected
     return p;</p>
  
  <p>What's the problem?</p>