cpp format a string
for older standard cpp
char cc[55];
sprintf_s(cc, "%09d tttttt %.3f sssss", 7, 1.234567);
cout << cc << endl; // 000000007 tttttt 1.235 sssss
string ss(cc);
cout << ss << endl;
cpp20
std::format();
char cc[55];
sprintf_s(cc, "%09d tttttt %.3f sssss", 7, 1.234567);
cout << cc << endl; // 000000007 tttttt 1.235 sssss
string ss(cc);
cout << ss << endl;
std::format();