随笔分类 -  日常随笔

看见啥,思考啥,死磕了啥,都随笔记录而已
摘要:等待一秒方法, (1)Sleep(1000);等待1000毫秒 (2)#include<time.h> time_t t=time(NULL); //获取从1970年1月1日开始算起的秒数 while(time(NULL)==t); //直到秒数不同,即过了1秒 阅读全文
posted @ 2016-05-02 13:36 chris_chan1024 阅读(599) 评论(0) 推荐(0)
摘要:#include <stdio.h> #include <math.h> int main() { double a, b, c, disc, x1, x2, p, q, i; do { scanf_s("a=%lf,b=%lf,c=%lf", &a, &b, &c); i = b*b - 4 * 阅读全文
posted @ 2016-03-06 12:09 chris_chan1024 阅读(1849) 评论(0) 推荐(0)
摘要:推箱子,于一个月前解决,在该游戏中有一个难题,如今写出以便以后查看推箱子中的状态改变,可以通过清屏后输出数组#includesystem("cls");这种清屏方式会造成屏幕闪烁厉害,肉眼可见解决方法:1、屏幕部分涂改HANDLE hOut=GetStdHandle(STD_OUTPUT_HANDL... 阅读全文
posted @ 2016-01-05 20:37 chris_chan1024 阅读(1864) 评论(0) 推荐(0)
摘要:#include using namespace std;int main(){ int i=0,j=0; coutusing namespace std;int hello1();int hello2();int main() { int a, b; cout<<"a="<... 阅读全文
posted @ 2015-12-21 00:25 chris_chan1024 阅读(257) 评论(0) 推荐(0)