May 2017
Intermediate to advanced
590 pages
17h 18m
English
To return multiple values from a function using a compiler that supports C++17 you should do the following:
std::tuple<int, std::string, double> find() { return std::make_tuple(1, "marius", 1234.5); }
auto [id, name, score] = find();
if (auto [id, name, score] = find(); score > 1000) { std::cout << name << std::endl; }
Read now
Unlock full access