Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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/



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: