Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <vector>
- #include <tuple>
- #include <iostream>
- int main() {
- std::vector<std::tuple<int, int>> tuples;
- for (int i = 0; i < 10; ++i) {
- tuples.push_back(std::make_tuple<>(i, i + i));
- }
- for (int i = 0; i < tuples.size(); ++i) {
- std::cout << std::get<0>(tuples[i]) << " = " << std::get<1>(tuples[i]) << std::endl;
- }
- }
Add Comment
Please, Sign In to add comment