Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Apress/beginning-cpp20
/ swap
Function
swap
Examples/NoModules/Chapter 08/Ex8_17.cpp:50–55 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
48
}
49
50
void swap(Words& words, size_t first, size_t second)
51
{
52
auto temp{words[first]};
53
words[first] = words[second];
54
words[second] = temp;
55
}
56
57
// Sort strings in ascending sequence
58
void sort(Words& words)
Callers
1
sort
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected