![]() |
itsy bitsy bug
Code:
if (NULL == vertex->right() == vertex->left()) THAT IS UNTIL we take apart and realize how the compiler sees this statement differently from us. NULL is #define'd as 0. Boolean values are represented by 1 = true, 0 = false So if the right vertex was NULL, it would evaluate that part of the equation to True before moving on. Now we would basically have the following: Code:
if (1 == vertex->left()) Likewise, if vertex->right() was not NULL, it would evaluate to false. So now we have: Code:
if (0 == vertex->left() Correct: Code:
if (vertex->right() == NULL && vertext->left() == NULL) |
fuck uyou nerd
|
is this EQ code? some sort of in-house language?
|
C-Increment
|
ahh cool, those are some interesting looking if statements
|
|
All times are GMT -4. The time now is 10:27 AM. |
Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.