ラベル ssprintf の投稿を表示しています。 すべての投稿を表示
ラベル ssprintf の投稿を表示しています。 すべての投稿を表示

ssprintf.hpp

概要
  sprintf の std::string 版.
プロトタイプ宣言動作説明
std::string ssprintf(const char* format, ...);sprintf の std::string 版.
使用例
#include <sstd/sstd.hpp>

int main(){
    printf("%s", sstd::ssprintf("Num: %d, Str: %s\n", 1234, "abcd").c_str());
}

実行結果
$ ./exe.exe
Num: 1234, Str: abcd
実装