fork(1) download
  1. #include <vector>
  2. #include <iostream>
  3.  
  4. int main()
  5. {
  6. std::vector<bool> v;
  7. std::cout << std::boolalpha;
  8. v.push_back(true);
  9. std::cout << v[0] << std::endl;
  10. v[0] = false;
  11. std::cout << v[0] << std::endl;
  12. }
  13.  
  14.  
Success #stdin #stdout 0s 3028KB
stdin
Standard input is empty
stdout
true
false