Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在以下 C++ 函数中:
void save_data(std::ofstream& csv) { csv << "a message"; }
我不明白的东西:如果save_data被调用,它会写到哪里?到文件?它究竟是如何使用的?
save_data
Anofstream表示文件系统上的一个文件:
ofstream
int main() { ofstream file("Plop.txt"); save_data(file); }