自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

原创 从cin读入一组词并把它们存入一个vector对象,然后设法把所有词都改写为大写,输出改变后的结果

#include "stdafx.h" #include <iostream> #include <vector> #include <string> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { string s1; cout << "输入一组词:"; vecto...

2018-03-23 21:17:52 857

原创 读入一个包含标点符号的字符串,将标点符号去除后输出字符串剩余的部分

读入一个包含标点符号的字符串,将标点符号去除后输出字符串剩余的部分#include "stdafx.h" #include &lt;iostream&gt; #include &lt;string&gt; using namespace std; int _tmain(int argc, _TCHAR* argv[]) { string s; cout &lt;&lt; "请输入一段字符...

2018-03-23 19:58:30 1556

转载 C++读写二进制文件

C++读写二进制文件#include "stdafx.h" #include &lt;iostream&gt; using namespace std; #include &lt;fstream&gt; //读写二进制文件 struct Student //里面不能写string { char name[30]; char sex; float math; float chinese...

2018-03-03 14:47:17 379

转载 C++读写文本文件

C++读写文本文件#include "stdafx.h" #include &lt;iostream&gt; using namespace std; #include &lt;fstream&gt; //读写文本文件 int _tmain(int argc, _TCHAR* argv[]) { fstream ifs("src.txt", ios::in); if (!ifs) co...

2018-03-03 14:43:27 197

原创 文件输入输出ifstream ofstream fstream

ifstream ofstream fstream#include "stdafx.h" #include &lt;iostream&gt; using namespace std; #include &lt;fstream&gt; int _tmain(int argc, _TCHAR* argv[]) { ifstream ifs("aa.c"); //ios::in if (!ifs...

2018-03-03 14:42:29 282

转载 IO对象的相关属性与操作

IO对象的相关属性与操作#include "stdafx.h" #include &lt;iostream&gt; using namespace std; #include &lt;fstream&gt; //IO 对象不可复制或赋值 //void func(fstream fs) //{ // //} void func(fstream&amp; fs) { } int _tma...

2018-03-03 14:40:46 312

转载 C++标准输出cout

C++标准输出cout#include "stdafx.h" #include &lt;iostream&gt; using namespace std; #include &lt;iomanip&gt; //流的常用控制符的头文件 //输出 cout //cout cin是对象 int _tmain(int argc, _TCHAR* argv[]) { #if 0 //系统提供的相...

2018-03-03 14:38:23 368

转载 C++标准输入cin

C++标准输入cin#include "stdafx.h" #include &lt;iostream&gt; using namespace std; #include &lt;string&gt; //cin int _tmain(int argc, _TCHAR* argv[]) { int a; double b; string c; //cin &gt;&gt; a &gt...

2018-03-03 14:37:38 261

转载 C语言文件操作练习

C语言文件操作练习#include "stdafx.h" #include &lt;iostream&gt; using namespace std; int _tmain(int argc, _TCHAR* argv[]) { FILE* fp = fopen("xx.c", "w+"); if (!fp) cout &lt;&lt; "open error" &lt;&am

2018-03-03 13:56:04 884

转载 fstream的自实现

fstream的自实现#include "stdafx.h" #include &lt;iostream&gt; using namespace std; #include &lt;fstream&gt; class Stream { public: Stream(char* path = NULL, char* mode = NULL) { //为实现open功能,创建对象时没有初值直...

2018-03-03 13:51:05 261

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除