fork download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. void myprint()
  5. {
  6. std::cout << std::endl;
  7. }
  8.  
  9. template <typename T, typename... Args>
  10. void myprint(const T& value, const Args&... args)
  11. {
  12. std::cout << value;
  13. myprint(args...);
  14. }
  15.  
  16. int main()
  17. {
  18. myprint(5, 4, "asdf");
  19. int z = 4;
  20. myprint("x = ", 5, ";", " z = ", z);
  21.  
  22. return 0;
  23. }
  24.  
Success #stdin #stdout 0s 2884KB
stdin
Standard input is empty
stdout
54asdf
x = 5; z = 4