Because a and b were successfully incrementented? You have putten an 'conditional or' operator between the two statements. Although I am not an C expert, usually, when the first part appears to be true the second part will not performed at all.
Correct C#Jaap, the logical and (&&) and or (||) operators use shortcut evaluation, that is if they can determin the result after evaluating the left hand expression they do not bother evaulating the right hand expression. For && this means if the left hand expression is false the right hand expression is not evaluated and for || this means if the left hand expression is true the right hand expression is not evaluated.
It means things like you can safely test a pointer and dereference it in the same if statement
if (valid != 0 && (*valid) != 0)
// Its valid
// Its not valid or valid is NULL which is also probably not valid
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 ...