Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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

In tutorials, I find many examples of code that return the error, "not availble in C99."

MacBook Pro, Mac OS X (10.7.5)

Posted on Feb 23, 2013 6:14 PM

Reply
13 replies

Feb 23, 2013 7:58 PM in response to rwhylbom

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.

Feb 23, 2013 8:13 PM in response to rwhylbom

Yes that would explain it. g_wolfman supplied a very good explanation.


Yes C is a very interesting language. Most people have a love it or hate it reaction to it. I love it. I find it a very nice concise language. You can learn its basics in an evening then spend the rest of your life exploring it.


If you want to learn it, take your time, read as much code as you can get your hands on and experiment.


regards

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

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.