fork(1) download
  1. #include <cstdlib>
  2. #include <iostream>
  3. #include <list>
  4. #include <vector>
  5.  
  6.  
  7. using namespace std;
  8.  
  9.  
  10. int main()
  11.  
  12. {
  13. vector<int> numbers = {2, 4, 6, 8};
  14. int i = 0;
  15. for(i=0; i< numbers.size();i++)
  16. cout << "the current number is " << numbers[i];
  17.  
  18.  
  19. system("pause");
  20.  
  21. return 0;
  22.  
  23. }
Success #stdin #stdout 0s 3060KB
stdin
Standard input is empty
stdout
the current number is 2the current number is 4the current number is 6the current number is 8