fork(1) download
  1. #include <iostream>
  2. #include <sstream>
  3. #include <iomanip>
  4. #include <vector>
  5.  
  6. int main()
  7. {
  8. std::vector<float> components {1, 2, 3, 1.5f, 2.5f, 3.5f, 1.25f, 2.25f, 3.25f, 1.12345f};
  9.  
  10. std::stringstream result;
  11. result << "<";
  12. for(auto it = std::begin(components); it != std::end(components); ++it)
  13. {
  14. if(it != std::begin(components))
  15. {
  16. result << ", ";
  17. }
  18. result << *it;
  19. }
  20. result << ">";
  21. std::cout << result.str();
  22. return 0;
  23. }
  24.  
Success #stdin #stdout 0s 3228KB
stdin
Standard input is empty
stdout
<1, 2, 3, 1.5, 2.5, 3.5, 1.25, 2.25, 3.25, 1.12345>