C++ of course can have better results because of constructors and templates, my code is for C and I honestly was sure, and for many years until yesterday, that this kind of sugar is basically impossible to achieve in C.
With modern C++ you can use the {fmt} library, which is so awesome it became part of the C++20 standard as `std:: format`.