#include<iostream> using namespace std; struct Point { int x, y; Point(int x=0, int y=0):x(x),y(y) {} }; int main() { Point p1, p2; swap(p1, p2); return 0; }
1 #include<iostream> 2 using namespace std; 3 4 struct Point { 5 int x, y; 6 Point(int x=0, int y=0):x(x),y(y) {} 7 }; 8 9 int main() { 10 Point p1, p2; 11 swap(p1, p2); 12 return 0; 13 }
#include<iostream> using namespace std; struct Point { int x, y; Point(int x=0, int y=0):x(x),y(y) {} }; int main() { Point p1, p2; swap(p1, p2); return 0; }
#include<iostream> using namespace std; struct Point { int x, y; Point(int x=0, int y=0):x(x),y(y) {} }; int main() { Point p1, p2; swap(p1, p2); return 0; }