fork download
  1. #include <iostream> // std::cout
  2. #include <iterator> // std::ostream_iterator
  3. #include <vector> // std::vector
  4. #include <algorithm> // std::copy
  5. #include <iterator>
  6.  
  7. int main () {
  8. int Grades[5] = { 3, 2, 5, 2 };
  9.  
  10. std::copy (std::begin(Grades), std::end(Grades), std::ostream_iterator<int>(std::cout, ", ") );
  11. return 0;
  12. }
Compilation error #stdin compilation error #stdout 0s 3468KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:10:14: error: 'begin' is not a member of 'std'
   std::copy (std::begin(Grades), std::end(Grades), std::ostream_iterator<int>(std::cout, ", ") );
              ^
prog.cpp:10:34: error: 'end' is not a member of 'std'
   std::copy (std::begin(Grades), std::end(Grades), std::ostream_iterator<int>(std::cout, ", ") );
                                  ^
stdout
Standard output is empty