我正在调试具有以下行的代码:
char file_name[128];
sprintf(file_name, "layer-%03d-%02d-out.csv", c, i);
CSV::SaveVector(file_name, current_vector);
int SaveVector(const std::string &filename, const Perceptron::EigenVector &v) {
FILE *fp = fopen(filename.c_str(), "w");
if (!fp) {
MinLog("Failed to open file %s\n", filename.c_str());
return FILE_ERROR;
}
for (int i = 0; i < v.size(); ++i) {
fprintf(fp, "%s%.16lf", (i>0 ? " ," : ""), static_cast<double>(v[i]));
}
fclose(fp);
return NO_ERRORS;
}
该语句没有给出任何错误,但我在当前文件夹的任何位置都找不到 file_name。该文件将保存在哪里?