// Hàm kết hợp các chuỗi trong tuple
std::string combineStrings(const std::tuple<std::string, std::string, std::string>& inputTuple) {
std::string result = "";
result += std::get<0>(inputTuple);
result += std::get<1>(inputTuple);
result += std::get<2>(inputTuple);
return result;
}
#include <iostream>
#include <tuple>
#include <string>
// Hàm kết hợp các chuỗi trong tuple
std::string combineStrings(const std::tuple<std::string, std::string, std::string>& inputTuple) {
std::string result = "";
result += std::get<0>(inputTuple);
result += std::get<1>(inputTuple);
result += std::get<2>(inputTuple);
return result;
}
int main() {
std::tuple<std::string, std::string, std::string> myTuple = std::make_tuple("Hello, ", "world", "!");
std::string combinedString = combineStrings(myTuple);
std::cout << "Ket qua: " << combinedString << std::endl;
return 0;
}