Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Apps and Programs
C Program Trouble Compiling w/GCC, Trouble Running in Xcode
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="wmprice1240" data-source="post: 916151" data-attributes="member: 99551"><p>I had no issues compiling and running your code via the command line or in XCode so it seems like your environment may be at issue from the CL. Also, you need to declare</p><p></p><p>#include <stdlib.h></p><p></p><p>to allow the abs function to be within the compilation scope to get the correct output. If you add this you should be all set.</p></blockquote><p></p>
[QUOTE="wmprice1240, post: 916151, member: 99551"] I had no issues compiling and running your code via the command line or in XCode so it seems like your environment may be at issue from the CL. Also, you need to declare #include <stdlib.h> to allow the abs function to be within the compilation scope to get the correct output. If you add this you should be all set. [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
macOS - Apps and Programs
C Program Trouble Compiling w/GCC, Trouble Running in Xcode
Top