This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| new:swap [2018/02/19 10:41] – created korshun | new:swap [2019/09/05 20:41] (current) – removed korshun | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== swap ====== | ||
| - | '' | ||
| - | [[new: | ||
| - | |||
| - | ===== Examples ===== | ||
| - | Without '' | ||
| - | < | ||
| - | int tmp = x; | ||
| - | x = y; | ||
| - | y = tmp; | ||
| - | </ | ||
| - | |||
| - | With '' | ||
| - | < | ||
| - | swap(x, y); | ||
| - | x = r1; | ||
| - | y = r2; | ||
| - | </ | ||