摘要: time函数的运用,输出是没输换行,在流中,就什么的输不出,可以用清流函数,fflush(stdout) 代码 #include<iostream>#include<cstdio>#include<iomanip>#include<ctime>#include<cstdlib>using names 阅读全文
posted @ 2016-07-12 20:59 立刻行动 阅读(927) 评论(0) 推荐(0) 编辑
摘要: 初学C++,在结构体中写函数及一些C++语言需要的一些格式 看代码 #include<iostream>#include<cstdio>using namespace std; struct what_day{ int year; int month; int day; void count(int 阅读全文
posted @ 2016-07-12 13:07 立刻行动 阅读(928) 评论(0) 推荐(0) 编辑
摘要: 闲话少说,先看一个swap交换数字的代码 叫换a,b的值 代码 #include<iostream>#include<cstdio>using namespace std; void swap(int& a,int& b)//引用方式交换{ int temp; temp=a; a=b; b=temp 阅读全文
posted @ 2016-07-12 12:37 立刻行动 阅读(150) 评论(0) 推荐(0) 编辑