若不存在则新建文件,相当于python的a追加模式:
写入的内容添加在文件的末尾
std::ofstream off("sdk_input.txt", std::ios::app);
// file.open("flow.txt", std::ios::app);
for (auto i :model_input.input_idx)
off << i << ",";
off << std::endl;
C++大写转小写:
string input_str_copy = input_str;
std::transform(input_str_copy.begin(), input_str_copy.end(), input_str_copy.begin(),
[](unsigned char c){ return std::tolower(c); });