数组的逆序输出
来源:互联网 发布:会声会影 mac版 编辑:程序博客网 时间:2024/05/17 08:53
/*
*Copyright(c) 2016.烟台大学计算机与控制工程学院
*ALL rights reserved.
*文件名称:main.cpp
*作者:孙超
*问题描述:阅读下面的程序
*/
#include <iostream>
#include <cstdlib>
#include <fstream> // (1)
using namespace std;
int main()
{
fstream file;
file.open("abc.txt", ios::in); // (2)
if(!file)
{
cout<<"abc.txt can’t open."<<endl;
exit(1);
}
char ch;
int i=0;
while(file.get(ch)) // (3)
{
++i; // (4)
}
cout<<"Character: "<<i<<endl;
file.close();// (5)
return 0;
}
*Copyright(c) 2016.烟台大学计算机与控制工程学院
*ALL rights reserved.
*文件名称:main.cpp
*作者:孙超
*问题描述:阅读下面的程序
*/
#include <iostream>
#include <cstdlib>
#include <fstream> // (1)
using namespace std;
int main()
{
fstream file;
file.open("abc.txt", ios::in); // (2)
if(!file)
{
cout<<"abc.txt can’t open."<<endl;
exit(1);
}
char ch;
int i=0;
while(file.get(ch)) // (3)
{
++i; // (4)
}
cout<<"Character: "<<i<<endl;
file.close();// (5)
return 0;
}
0 0
- 数组的逆序输出
- 数组的逆序输出
- 数组的逆序输出
- java数组的逆序输出
- oj-14-数组的逆序输出
- 输出逆序后的数组元数
- 一维数组的逆序输出
- 数组逆序输出(递归)
- 数组逆序输出
- 逆序输出数组元素
- 数组逆序输出20130421
- 数组逆序输出
- 数组逆序输出
- 数组逆序输出
- 逆序输出有序数组
- 指针逆序输出数组
- 数组逆序输出元素
- 逆序输出数组元素
- [Perk]如何实现波浪效果(Swift)
- smarty模板引擎--php高级最详细教程
- 异常解决方案
- Linux命令练习第二关(5)
- 水题-Codeforces Round #369 Div.2-A
- 数组的逆序输出
- linux学习之正则表达式
- String知识点
- 使用phonegap操作数据库
- 加载Loader.bin
- javascript如何创建子节点
- 辩数字
- PHP面向对象的程序设计封装--php高级最详细教程
- CF#369(Div2) C. Coloring Trees (DP)