Why am I getting an error

I’m getting an error when I try to compile my code and can’t figure out why. Please help. The first error message is:

Need function definition or declaration

There are 9 more errors listed.

If I comment out the left shift and the two nested if statements the error just drops to the next shift left statement.

Thanks
Tom

I haven’t tried compiling the code as there are too many bits missing but my suspicion is that the comments ending in \ are the problem. A line in C ending with a \ indicates that the next line is to be taken as a continuation of this line which means the if statements following them are being swallowed up into the comment.

Regards,
Peter

Which raises the question: Why don’t the identical lines above the offending line cause an error?

The backslashes were the problem. I deleted them and it now compiles.

Thanks

The error appeared where it did due to the mismatched }s eventually causing the compiler to think the function was finished. The opening {s were being swallowed up as they were inline with the if statements.

Regards,
Peter