Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

Presumably this questionthis 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?

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?

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?

added 683 characters in body; edited tags
Source Link
Martijn Pieters
  • 1.1m
  • 96
  • 930
  • 755

presumably the questionPresumably 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?

presumably the 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

Are there rules about preventing deletion, if somebody ups it or favorites 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?

Source Link
pm100
  • 50k
  • 15
  • 6

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

presumably the 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

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