fork download
  1. #include <vector>
  2. #include <iostream>
  3.  
  4. int main() {
  5. std::vector<bool> bv;
  6. bv.push_back(true);
  7. bv.push_back(false);
  8.  
  9. std::cout << &bv[1] << std::endl;
  10.  
  11. return 0;
  12. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:9:20: error: taking address of temporary [-fpermissive]
  std::cout << &bv[1] << std::endl;
                    ^
stdout
Standard output is empty