Currently Being ModeratedDec 1, 2012 7:09 AM (in response to Weatherlord Catrina)
You should create a new command line project, then add your c file to the project (removing the c file that the project already has), then compile.
To create a new project select the menu item "File > New > Project...":
Now select the "Command Line Tool":
Follow the prompt to enter the name of the project, then where to store the project. When you have completed, click the file main.c and you should see a window like:
I suggest compiling and running this first. To run the program select the menu item "Product > Run". XCode will compile, link, then run the program. You see the output window appear like:
Once you have done this. you can replace the main.c file with your own OR replace the contents of this main.c file with the contents of your file by copy and paste.