C++中的sprintf_s格式化string

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/grllery/article/details/82747556

char input[200];

std::string s = "C:\\";

sprintf_s(input, "%s", s.c_str());

注意要调用c_str().

猜你喜欢

转载自blog.csdn.net/grllery/article/details/82747556
今日推荐