fork download
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <iterator>
  4.  
  5. int main() {
  6. int setB[] = { 1, 2, 3 };
  7. std::cout << "Set B : {";
  8. std::ostream_iterator<int> out_it (std::cout,", ");
  9. std::copy ( std::begin(setB), std::end(setB), out_it );
  10. std::cout << " }" << std::endl;
  11. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
Set B : {1, 2, 3,  }