This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
new:swap [2018/02/19 10:42] – 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; | ||
- | </ |