(C++) operator!

February 24, 2017 · View on GitHub

 

 

 

 

 

(C++) operator!

 

operator! (pronounces as 'bitwise not operator') is an operator to perform bitwise not. The example below shows how to reconstruct its truth table:

 


#include <iostream> int main() {   const bool f = false;   const bool t = true;   std::cout     << (!f) << '\n'  //1     << (!t) << '\n'; //0 }