重载求最大值
来源:互联网 发布:会声会影 mac版 编辑:程序博客网 时间:2024/06/04 01:14
/*
*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实现函数重载,求最大值!
- 求最大值
- 求最大值
- 求最大值
- 求最大值
- 求最大值
- 求最大值
- 求最大值
- 求最大值
- 求最大值....
- 求最大值
- 求最大值
- 求最大值
- 求最大值
- 二维数组求最大值
- 学习笔记之——RadioButton在XML文件便可实现点击切换样式
- 16.5.2
- Vulkan教程说明
- oracle substr,substrb ,instr,instrb函数的用法以及like的优化
- 【Linux网络编程】原始套接字实例:MAC 头部报文分析
- 重载求最大值
- Android反编译工具Android Killer
- JAVA多线程(1)
- [Perk]如何实现波浪效果(Swift)
- smarty模板引擎--php高级最详细教程
- 异常解决方案
- Linux命令练习第二关(5)
- 水题-Codeforces Round #369 Div.2-A
- 数组的逆序输出