MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / swap

Function swap

Examples/Modules/Chapter 08/Ex8_17.cpp:51–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void swap(Words& words, size_t first, size_t second)
52{
53 auto temp{words[first]};
54 words[first] = words[second];
55 words[second] = temp;
56}
57
58// Sort strings in ascending sequence
59void sort(Words& words)

Callers 4

sortFunction · 0.70
Message.cppFile · 0.50
swapMethod · 0.50
quicksortFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected