子函数调用oftream的问题
需要在子函数中实现数据输出
编译时出现错误:error C2061: 语法错误 : 标识符“ofstream”
// main函数
#include "stdafx.h"
#include <fstream>
using namespace std;
ofstream be;
char fnbuf[256];
sprintf(fnbuf,"out.txt");
out.open(fnbuf);
myfunc(be);
// 子函数声明
void myfunc(ofstream s)
// 声明
#include <fstream>
void myfunc(std::ofstream *);
// 定义
#include <fstream>
void myfunc(std::ofstream *s)
{}