| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 3460 人关注过本帖
标题:ifstream问题
取消只看楼主 加入收藏
bvcfortran
Rank: 1
等 级:新手上路
帖 子:86
专家分:0
注 册:2006-11-30
收藏
 问题点数:0 回复次数:3 
ifstream问题
为什么我在C++文件中调试成功的程序,VC中却出问题呢?
搜索更多相关主题的帖子: ifstream 文件 调试 
2007-03-21 18:50
bvcfortran
Rank: 1
等 级:新手上路
帖 子:86
专家分:0
注 册:2006-11-30
收藏
得分:0 
提示错误为:'ifstream' : ambiguous symbol

Thanks for your help, and I\'ll do my best to help the others the same time~~
2007-03-21 18:51
bvcfortran
Rank: 1
等 级:新手上路
帖 子:86
专家分:0
注 册:2006-11-30
收藏
得分:0 

#include<iostream.h>
#include<fstream.h>
#include <stdio.h>
#include<vector>
using namespace std;

int COpenFileView::LoadData()
{

ifstream in("E:\\data.dat");
vector<float> r;
for(float x;in>>x;)
r.push_back(x);
for(int j=0;j<r.size();j++)
cout<<r[j]<<endl;
MessageBox("hello");

return 0;
}
程序如上:运行报错
error C2872: 'ifstream' : ambiguous symbol
Error executing cl.exe.
那位能帮个忙啊,是在VC下运行的


Thanks for your help, and I\'ll do my best to help the others the same time~~
2007-03-22 18:10
bvcfortran
Rank: 1
等 级:新手上路
帖 子:86
专家分:0
注 册:2006-11-30
收藏
得分:0 

嗷嗷感谢哦!运行通过了,强人不愧为强人,谢谢各位!


Thanks for your help, and I\'ll do my best to help the others the same time~~
2007-03-25 09:27
快速回复:ifstream问题
数据加载中...
 
   



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

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