Im having a problem with the while loop in my code, if I change what X2 is being compared to to anything other than 0 it doesnt hit the while loop, I am hoping its just some weird mistake. Thanks in advance for any help.
X2 = 0.5;
while (X2 >= 2.5)
total = total + 1;
X2 = X2 - 0.00001;
In that case it's actually very logic the while loop is never running: while (X2 == 0.0f) The syntax of a while statment: while([U]condition[/U]) So when condition is true the code in the loop is run, but since X2 has the value '0.5' and since 0.5 == 0.0 results in a false the loop is never run as a result ...
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 ...