need help to compile my C program. It keeps telling me i have errors!** new Problem**

Mucman

Diamond Member
Oct 10, 1999
7,246
1
0
Umm, the error messages seem pretty self explanatory...

your main function should be declared

int main()
{
// code here
return 0;
}

<edit>I guess you figured it out :)</edit>
 

imported_vr6

Platinum Member
Jul 6, 2001
2,740
0
0
ok i got it, thanks.

Ok one more thing, how do i get the program to display the comments in the beginning?
 

RSMemphis

Golden Member
Oct 6, 2001
1,521
0
0


<< Take "\n" out of all of your scanf calls. >>



Edit: if necessary (it is not), you can put a \n at the beginning of your printf strings.
But the \n at the end of the scanf input string messes you up. Scanf is picky.
 

Adrian Tung

Golden Member
Oct 10, 1999
1,370
1
0


<< Ok one more thing, how do i get the program to display the comments in the beginning? >>


You can't, unless you printf them out. Comments are only meant for internal use, they don't get into the binary after you compile the code.


:)atwl