#include void swap(int *a, int *b) { int t = *a; *a = *b; *b = t; } main() { int x = 15, y = 74; std::cout << x << " " << y << std::endl; swap(&x, &y); std::cout << x << " " << y << std::endl; }