fork(1) download
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5.  
  6. int main(){
  7. int t[4] = {1, 2, 3, 4};
  8. int *p1 = t+2, *p2 = p1 -1;
  9. p1++;
  10. std::cout <<*p1**p2 <<std::endl;
  11. //const unsigned SIZE_OF =5;
  12. //int const numbers[SIZE_OF] = {0, 1, 0, 1, 0};
  13. //int const * const numberIterator = std::find(numbers, numbers+SIZE_OF, 1);
  14. //std::cout << std::distance(numbers, numberIterator);
  15.  
  16. //std::vector<int> myvector;
  17. //for(int i = 1; i<=10; i++)
  18. //myvector.push_back(i);
  19. //myvector.erase(myvector.begin() +6);
  20. //myvector.erase(myvector.begin(), myvector.begin() +4);
  21. //for(unsigned i = 0; i< myvector.size();++i)
  22. //std::cout <<''<<myvector[i];
  23.  
  24. }
  25.  
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
8