MCPcopy Create free account
hub / github.com/andreasfertig/programming-with-cpp20 / WithStdFormat

Function WithStdFormat

05.01-stdFmtStockIndex0/main.cpp:106–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106void WithStdFormat()
107{
108 for(const auto& index : GetIndices()) {
109 std::cout << std::format(
110 "{:10} {:>8.2f} {:>6.2f} {:.2f}%\n",
111 index.name(),
112 index.points(),
113 index.pointsDiff(),
114 index.pointsPercent());
115 }
116}
117
118int main()
119{

Callers 1

mainFunction · 0.70

Calls 6

nameMethod · 0.80
GetIndicesFunction · 0.70
formatFunction · 0.50
pointsMethod · 0.45
pointsDiffMethod · 0.45
pointsPercentMethod · 0.45

Tested by

no test coverage detected