我知道当 if(x!=value){...} 时 != 是什么,但它在以下上下文中是什么意思:
if (! ReadConsoleInput(
hStdin, // input buffer handle
irInBuf, // buffer to read into
128, // size of read buffer
&cNumRead) ) // number of records read
ErrorExit("ReadConsoleInput");
或
if (! SetConsoleMode(hStdin, fdwMode) )
ErrorExit("SetConsoleMode");
或
if (! GetConsoleMode(hStdin, &fdwSaveOldMode) )
ErrorExit("GetConsoleMode");
最佳答案
它是“非”运算符:如果操作数为零,则为真 (1),否则为假 (0)。
关于c++ - !在 C++ 中的含义(以下上下文),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6287019/