Hacker News new | ask | show | jobs
by throw4023042q0 764 days ago
> This is also one of the reasons why printf won't work. You cannot pass a type like std::string to a variable args function.

Can't you just call .c_str() on the std::string first to get to the null-terminated char array? https://cplusplus.com/reference/string/string/c_str/