title: WARNING: "implicit declaration of function '...' is invalid in C99"
body: <p>I'm getting this warning when I'm trying to compare RGB components of two UIColors</p>
  
  <p>In .h file, I declared this</p>
  
  <pre><code> -(int) ColorDiff:(UIColor *) color1 :(UIColor *)color2;
  </code></pre>
  
  <p>In .m file</p>
  
  <pre><code> - (int) ColorDiff:(UIColor *) color1 :(UIColor *)color2{
     ... //get RGB components from color1&amp; color2
     // compute differences of red, green, and blue values
     CGFloat red   = red1   - red2;
     CGFloat green = green1 - green2;
     CGFloat blue  = blue1  - blue2;
  
    // return sum of squared differences
    return (abs(red) + abs(green) + abs(blue));
    }
  </code></pre>
  
  <p>And then in same .m file, I compare 2 UIColors like this </p>
  
  <pre><code> int d= ColorDiff(C1,C2);// I got the warning right here.
  </code></pre>
  
  <p>I did research and people say I must include the header file. I did this but didn't help in my case. 
  Why am I getting this error?</p>