0511はちみつ餃子 ◆8X2XSCHEME 垢版 | 大砲2018/04/10(火) 00:44:35.92ID:141aKXKv 特に強い理由がなければ variadic template を使った方が安全だし簡単に書ける。 template<class... T> void test6(std::string str, T... args) { char buf[1024]; std::sprintf(buf, str.c_str(), args...); std::printf(buf); }