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"); 请问printwindow这个api函数的原理是什么 谁能说一下线程局部储存TLS的实现机制?我实在是没搞懂 石家庄有没有VC的学习群? vC 如何按照EXCEL 单元格的 number 类型把数据读出来 提问画象素图,请高手解答!!谢谢!! 小弟刚学vc,有几个简单问题请教? 求救!如何编写打印程序? 关于TreeCtrl点击右键的一个问题(一定给分) SafeArrayDestroy不知道对象类型,如何释放内存? 帮帮看这个问题 想实现一个这样的功能(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");