I have to format std::string with sprintf and send it into file stream. How can I do this?
Very-very simple solution.
std::string strBuf; strBuf.resize(256); int iCharsPrinted = sprintf_s((char *)strPath.c_str(), strPath.size(), ...); strBuf.resize(iCharsPrinted);