ifstream 的头文件 是什么啊 我的函数 用到 ifstream 函数,错误提示没有定义,请问下,头文件是什么啊 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 #include <fstream>using namespace std; 不+ using namespace std;行不行啊。 我用容器做 ifstream infile("D:\\1.7.txt"); if(!infile) AfxMessageBox( "Unable to open this file"); vector<double> files; while(infile >> word) files.push_back(word);头文件定义是这样的 #include "fstream.h"#include <vector> #include <algorithm>调试结果错误如下D:\学习专用\数值计算\512\512Dlg.cpp(187) : error C2062: type 'double' unexpectedD:\学习专用\数值计算\512\512Dlg.cpp(190) : error C2065: 'files' : undeclared identifierD:\学习专用\数值计算\512\512Dlg.cpp(190) : error C2228: left of '.push_back' must have class/struct/union type问下 错在那里啊 可以不加using namespace std;但是要在方法前加std:: std::ifstream infile("D:\\1.7.txt"); 串口通信出错 关于Render Filter编写 如何将CListBox设为多列 关于定义COM接口的初级问题 《深入解析atl》再放一次^-^带索引功能的. 我用socket api 做的ftp client,出现了问题。请看关键部分的代码. 在VB中调用VC开发的API出现的问题 win2000和win98兼容问题 MFC中怎样限制编辑框输入数据的长度 如何动态创建一个ComboBox或ComboBoxEx? 想实现一个这样的功能(MessageBox(...)), 请给一点支持. 今天笔试题让我大感意外。。。
using namespace std;
我用容器做
ifstream infile("D:\\1.7.txt");
if(!infile)
AfxMessageBox( "Unable to open this file");
vector<double> files;
while(infile >> word)
files.push_back(word);头文件定义是这样的
#include "fstream.h"
#include <vector>
#include <algorithm>调试结果错误如下D:\学习专用\数值计算\512\512Dlg.cpp(187) : error C2062: type 'double' unexpected
D:\学习专用\数值计算\512\512Dlg.cpp(190) : error C2065: 'files' : undeclared identifier
D:\学习专用\数值计算\512\512Dlg.cpp(190) : error C2228: left of '.push_back' must have class/struct/union type
问下 错在那里啊
但是要在方法前加std::
std::ifstream infile("D:\\1.7.txt");