Pages

Thursday, February 28, 2013

Re: In what ways does C in Xcode differ from standard C?

There is no add function in standard C.  If a tutorial includes a function call like add(3,4), then either they have defined the function somewhere in the tutorial (like Frank Caggiano has done in his example), or they defined it in a previous tutorial and are simply assuming that you are using everything previous done (which is poor practice in my opinion...)

 

The mathematical functions provided in standard C are defined in the header file math.h.  In the terminal, you can type "man math" to get teh manual page describing this header.  Otherwise, the binary math operators +, -, etc, etc are used exactly as they would be in normal infix arithmetic.


View the original article here

0 comments:

Post a Comment