Skip to main content

Practice ยท 3 of 3

Swap through references

Implement void swap_ints(int& a, int& b) exchanging the two caller objects using only references (no pointers, no return).

Difficulty: intermediate

Back to lesson: Practice: References: borrow and write through