GSt*_*Sto 0 c++
考虑以下功能:
void writer(ofstream &output) { output << "a string to write" << endl; }
但是当我试着调用它时,我得到一个"<<"未定义的错误.我怎样才能解决这个问题?
Eri*_*rik 7
添加#include <fstream>或更改ofstream为ostream
#include <fstream>
ofstream
ostream
很可能你缺少一个包含,因此只有前向声明.
归档时间:
14 年,12 月 前
查看次数:
363 次
最近记录: