fork(1) download
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. vector<bool> v(7);
  8. v[1]=v[3]=v[5]=true;
  9. for(bool f:v) cout<<f<<' ';
  10. return 0;
  11. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
0 1 0 1 0 1 0