博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
实验六
阅读量:4344 次
发布时间:2019-06-07

本文共 1231 字,大约阅读时间需要 4 分钟。

验证性实验

基础练习

#include
#include
using namespace std;int main(){ ofstream a("3.txt",ios_base::app); if(!"3.txt") { cout<<"fail to open"<

实验三1

#include 
#include
#include
#include
#include
#include "utils.h"using namespace std;typedef struct tongxue{ int xvhao; string xuehao; string xingming; string banji;};int main() { string b; ifstream a; if(!a) { cout<<"faile to open"<
>b; a.open(b); int c,i; cout<<"输入随机抽点人数"; cin>>c; cout<<"随机抽点中..."<
>shu[i].xvhao>>shu[i].xuehao>>shu[i].xingming>>shu[i].banji; string filename; filename = getCurrentDate()+".txt"; ofstream aa; if(!aa) { cout<<"fail to open"<

没有进行重复清理,然后也只能服务于这一个文本。

实验三2

#include
#include
#include
using namespace std;int main(){ ifstream fin; string wenjian; char zi; int i=0,j=0,k=0; int a,b,c; cout<<"输入要统计的英文文本文件名:"; cin>>wenjian; fin.open(wenjian); if(!fin){ cout<<"sorry"<

我是先计算出行数,然后用行数的几个string类型做的。

开始时候没有计算空格在计算字符数的时候。

转载于:https://www.cnblogs.com/0906mxyd/p/11047850.html

你可能感兴趣的文章
Spring day01
查看>>
hihocoder-1740-替换函数
查看>>
Codeforce Round #219 Div2
查看>>
option value的值可以有空格 再试试吧
查看>>
.htaccess to httpd.conf
查看>>
node.js 基础学习笔记2
查看>>
hadoop中常见元素的解释
查看>>
BZOJ-1497 最大获利
查看>>
4-4 修改文件
查看>>
并发编程(十):AQS
查看>>
条件注释判断浏览器版本<!--[if lt IE 9]>
查看>>
Comparison among several SGD derivation
查看>>
ModelAndView同时向页面传递多个参数
查看>>
samba 配置参数详解
查看>>
shell 正则表达式
查看>>
expect 交互 之双引号较长变量
查看>>
Altium designer18设置原理图尺寸
查看>>
公司人数和气质的限制关系
查看>>
数据集成工具Teiid Designer的环境搭建
查看>>
Coap协议学习笔记-第一篇
查看>>