Quote Originally Posted by jimblumberg View Post
Do you know the difference between assignment "=" and comparison "=="?

By the way your compiler should be able to help you solve this issue, insure your compiler is set up to generate warnings and never ignore those warnings.

From my compiler: "main.c|31|warning: suggest parentheses around assignment used as truth value [-Wparentheses]|"
are setting warning level high=warnings is reported as errors something to recommend when newbie or when nasty hard to find bugs like "=" when it should be "==" ?
single step thru debugger is one way to find bugs ala all kind of typos that dont generate errors but bugs that make code run not as intended
but automatic compiler checking thru lots of lines of code is better and faster