fork download
  1. #include <iostream>
  2. #include <iterator>
  3. #include <algorithm>
  4.  
  5. int main() {
  6. int * p = new int[2];
  7.  
  8. *p = 1;
  9. *(p + 1) = 2;
  10.  
  11. std::copy(p, p + 2, std::ostream_iterator<int>(std::cout));
  12.  
  13. delete[] p;
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 3228KB
stdin
Standard input is empty
stdout
12