标题:读取文件
取消只看楼主
bvcfortran
Rank: 1
等 级:新手上路
帖 子:86
专家分:0
注 册:2006-11-30
 问题点数:0 回复次数:6 
读取文件

在VC中怎样才能获取不断更新的文件名,将其读入
如文件名为1.dat,2.dat,3.dat
那么如何才能一次读入文件1,2,3呢?

多谢回复!

搜索更多相关主题的帖子: 文件 获取 
2007-04-13 14:03
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-04-17 10:41
bvcfortran
Rank: 1
等 级:新手上路
帖 子:86
专家分:0
注 册:2006-11-30
得分:0 

对对对,我就是5楼的意思,帮帮忙吧


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

获取文件路径之后,如何读文件呢?
我原来用的 ifstream in("E:\\1.dat");
现在不知道如何用了,如果用if语句判断,
CString mPath;
CFileFind finder;
for(GLint filename=1; i<100; i++)
{
mPath.Format("E:\\%2d.dat", i);
if(!finder.FindFile(mPath))
break;
else
ifstream in("E:\\1.dat");

}
则出错为:
error C2065: 'in' : undeclared identifier
应该如何改,多谢指教!

[此贴子已经被作者于2007-4-20 9:39:33编辑过]


Thanks for your help, and I\'ll do my best to help the others the same time~~
2007-04-20 09:38
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-04-22 11:42
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-04-22 12:00
bvcfortran
Rank: 1
等 级:新手上路
帖 子:86
专家分:0
注 册:2006-11-30
得分:0 
error C2143: syntax error : missing ';' before '.'
error C2143: syntax error : missing ';' before '.'
error C2065: 'in' : undeclared identifier
error C2296: '>>' : illegal, left operand has type 'double'
error C2297: '>>' : illegal, right operand has type 'double'

Thanks for your help, and I\'ll do my best to help the others the same time~~
2007-04-24 13:33



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




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

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