Actually, in C 0 always stands for false, but any other number stands for true (not only 1). I'm not sure about the other way, it is possible that for this direction C automatically returns 1 (instead of any number different from 0).
However, knowing C it might be that the expression (y != 0.001) returns 0 when false, but 0.001 when true?
You can just test the code by simply outputting what (y != 0.001) returns and work from there.
Careful, checking for inequality using float is not an exact science due to the way a real number is stored in memory.
Most like it ( y != 0.01 ) will return a 1.000000 even when it should have return a 0.000000 if you use a float type and not a double.
I am working creating a fully encapsulated, homogeneous singly linked data structure. The Listing class and SinglyLinkedList class that are part of the whole application compile fine, but the problem ...