Skip to main content
2 of 3
added 683 characters in body; edited tags
Martijn Pieters
  • 1.1m
  • 96
  • 930
  • 755

is it fair for a questioner to delete a question after several people have worked hard to resolve it

Presumably this question was deleted because the answer turned out to be embarrassingly obvious (in their mind). LIke

for(int i = 0; i < ct; i++);
{
    printf("%d", i);
}

But not that simple because people would have spotted it.

In many cases people have tried to help and spent some time hacking away, then the question disappears. Now I don't know what the answer was, I am curious; plus others might have found it useful

Original question:

C++ OR operator not working

I have some C++ code and for some reason i can't get the OR operator to work...

if (
  (this->keyboardManager->isKeyDown(VK_LEFT) == true)
|| 
  (this->keyboardManager->isKeyDown(0x41) == true)
)

Now both of these work on there own but when i combine them both wont trigger the if statement so both of these work. if (this->keyboardManager->isKeyDown(VK_LEFT) == true) and if(this->keyboardManager->isKeyDown(0x41) == true)

But the top one wont work.

My KeaboardManager::isKeyDown

return (GetAsyncKeyState(key) & 0x8000) ? 0 : 1;

Are there rules about preventing deletion, if somebody ups it or favorites it?

pm100
  • 50k
  • 15
  • 6