swap1.cpp

We use cookies. Read the Privacy and Cookie Policy

swap1.cpp

#include ‹stl.h›

#include ‹iostream.h›

int main() {

 int a = 42;

 int b = 19;

 cout ‹‹ "a = " ‹‹ a ‹‹ " b = " ‹‹ b ‹‹ endl;

 swap(a, b);

 cout ‹‹ "a = " ‹‹ a ‹‹ " b = " ‹‹ b ‹‹ endl;

 return 0;

}