I'm attempting at just writing a standard(very standard) application the code( C-programming compiled in Xcode) is error free except for one build error:
ld: duplicate symbol _main in /Users/jasonbillings/Desktop/TestProject/build/TestProject.build/Debug/TestProject.build/Objects-normal/i386/YouWereBornIn.o and /Users/jasonbillings/Desktop/TestProject/build/TestProject.build/Debug/TestProject.build/Objects-normal/i386/main.o
Command /Developer/usr/bin/gcc-4.2 failed with exit code 1
Ive tried everything to get rid of the error I dont know if it's Xcode or me heres the code i wrote its very standard
If any idea please postCode:#include <stdio.h> int subtract ( int this_year, int your_age ); int main ( ) { int this_year ; int your_age ; char your_name ; printf( " Welcome player please enter your name " ) ; scanf( "%s", &your_name ) ; printf( "Welcome your_name now please enter your age" ) ; scanf( "%d", &your_age) ; printf( "Now please enter the year" ) ; scanf( "%d", &this_year ) ; printf( "your_name, was born in %d\n", subtract ( this_year, your_age) ) ; getchar() ; } int subtract ( int this_year, int your_age ) { return this_year - your_age ; }![]()



LinkBack URL
About LinkBacks



