You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

02-structured-binding.cc 258 B

123456789101112
  1. #include <iostream>
  2. #include <tuple>
  3. std::tuple<int, double, std::string> get_data() {
  4. return std::make_tuple(1, 2.71828, "hello");
  5. }
  6. int main() {
  7. auto [a, b, c] = get_data();
  8. std::cout << a << " " << b << " " << c << std::endl;
  9. return 0;
  10. }

计算机大作业

Contributors (1)