#include #include using std::string; #include "swap.h" class MyClass { int x; public: MyClass(int i) { x = i; } MyClass operator +(MyClass b) { return MyClass(x + b.x); } }; #include "array.h" int main() { int a = 10; int b = 20; swap(a, b); swap(a, b); int x = 1; long y = 2; std::cout << sum(a, b) << std::endl; std::cout << sum(x, y) << std::endl; double f = 1.5; double g = 2.5; swap(f, g); string s1 = "Ciao"; string s2 = "Mondo"; swap(s1, s2); MyClass m1(10); MyClass m2(20); swap(m1, m2); sum(m1, m2); Array a1(10, 2.3); Array a2(1000, -2.0); swap(a1, a2); }