perfectf.cpp 475 B

1234567891011121314151617181920212223242526
  1. #include <iostream>
  2. #include <vector>
  3. #include <algorithm>
  4. using namespace std;
  5. class Items
  6. {
  7. double x;
  8. double y;
  9. int m;
  10. public:
  11. Items() : x(0),y(0), m(0){}; // #1
  12. Items (double xx, double yy, int mm): x(xx),y(yy), m(mm){}; // #2
  13. void Show() const { cout << x << ", " << y << ", " << m << endl;}
  14. };
  15. template<typename...Args>
  16. void dumb(int i, Args... args)
  17. {
  18. cout << i << endl;
  19. Items(args...).Show();
  20. }
  21. int main()
  22. {
  23. dumb(10, 2.2,4.4,1);
  24. }