标题:fstream的问题
取消只看楼主
feixian406
Rank: 1
等 级:新手上路
帖 子:23
专家分:0
注 册:2007-9-6
 问题点数:0 回复次数:1 
fstream的问题

源码:
#include "stdafx.h"
#include <iostream>
#include <fstream>

int _tmain(int argc, _TCHAR* argv[])
{
ofstream outfile("E:\\test.txt"); //A
return 0;
}
编译出错,说是A行的ofstream没定义,这是怎么回事呢?

搜索更多相关主题的帖子: fstream 
2007-11-01 15:00
feixian406
Rank: 1
等 级:新手上路
帖 子:23
专家分:0
注 册:2007-9-6
得分:0 
解决了!加上using namespace std就好了,还有#include &lt;iostream&gt;不需要。谢谢aipb2007
2007-11-02 11:18



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-182542-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.117179 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved