This tutorial explains things better than me:
What's Your Function?
It shows how to create Standard Tool project in Xcode and how make a simple C program. For example as the following:
#include <stdio.h>It works and the output is "My favorite number is 2." I can launch this program from Finder and see the terminal window:
int integerForSeedValue(int seedValue)
{
return seedValue - 3;
}
int main (int argc, const char * argv[]) {
int favoriteNumber = (3 + 4) / 2;
favoriteNumber = integerForSeedValue(favoriteNumber + 2);
printf("My favotite number is %d\n", favoriteNumber);
return 0;
}
No comments:
Post a Comment