fork(2) download
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5. int main () {
  6. vector<double> v;
  7. v.push_back(2.7);
  8. v.push_back(5.6);
  9. v.push_back(7.9);
  10.  
  11. for(int i = 0; i < v.size(); ++i) {
  12. cout << "v[" << i << "]==" << v[i] << "\n";
  13. }
  14.  
  15. }
  16.  
Success #stdin #stdout 0s 4436KB
stdin
Standard input is empty
stdout
v[0]==2.7
v[1]==5.6
v[2]==7.9