Need help compiling a C program, i can't find the errors..**new Problem**

gopunk

Lifer
Jul 7, 2001
29,239
2
0
try putting "int" before "main"... you need to specify the return type.

you misspelled length somewhere.
 

stonecold3169

Platinum Member
Jan 30, 2001
2,060
0
76
try commenting out your while loops. I'm not that familiar with vanilla c,, but it almost seems as though it's treating all of your while loops as do-whiles, minus the printing out. If you comment out those loops, and it works right, try putting in error print messages in your while loops to see if it is triggering them.

Also, do you have all the libraries included that you need? I know several unix compilers if they don;t see the correct library will sometimes sub in "implied" headers, but not the implimentations, and allow them to compile right.... just a thought.
 

imported_vr6

Platinum Member
Jul 6, 2001
2,740
0
0
ok i got all the problems solved, just one more thing, how do i get the program to display the comments at the beginning of the code?
 

stonecold3169

Platinum Member
Jan 30, 2001
2,060
0
76
I don't think you do... the compiler should ignore everything you comment out, leaving it out of the main program