电影怒放的演员表:C++里fstream和iostream有什么区别?

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/04 15:55:20
什么时候用到#include <fstream>
什么时候用到#include <iostream>

谢谢!

最见的说就是
fstream 是对文件输入输出
iostream是对屏幕上输入输出

你想往文件里保存内容,或者从文件里读取内容
就用fstream

向屏幕输出或者从屏幕上输入,用iostream