按行读取数据
2015-12-01 16:42
239 查看
CString contents;
ifstream in("E:\\1234.txt");
string filename;
string line;
int i = 0;
if (in)
{
while (getline (in,line))
{
CString temp;
temp.Format("%s",line.c_str());
cout << temp << endl;
}
}else
{
in.close();
return ;
}
in.close();
return ;
ifstream in("E:\\1234.txt");
string filename;
string line;
int i = 0;
if (in)
{
while (getline (in,line))
{
CString temp;
temp.Format("%s",line.c_str());
cout << temp << endl;
}
}else
{
in.close();
return ;
}
in.close();
return ;
相关文章推荐
- Web.config配置文件详解(转载)
- iOS 游戏渠道SDK 抽象工程封装(上)
- iOS UITextField的使用
- Quartz2D绘图
- iOS常用的四种数据持久化
- linux socket编程
- SQL Server ->> 更改服务器时区对SQL Server Agent服务器的影响
- 可编辑表格(Editable Table)
- 如何在Oracle中导入dmp文件
- asp中获取时间yyyymmddhhmmss格式!
- asp中获取时间yyyymmddhhmmss格式!
- Chrome浏览器Adobe Flash Player因过期而遭阻止
- select按钮的反馈和改变字体的颜色
- HDU 1223 Order Count dp java
- IOS之UI控件之间的继承关系
- Bootstrap v2.3.2 动态绑定折叠
- ActiveRecord模式
- Failed to merge incompatible data types StringType and BinaryType
- MySQL中导出用户权限设置的脚本
- MySQL中导出用户权限设置的脚本