随笔分类 -  C/C++

在刷PAT的过程中学到的 一些陌生函数的用法,和一些零碎的知识点
摘要:%lf输入,%f格式输出 结果正确 %lf输入,%lf输出,结果错误??? 阅读全文
posted @ 2020-10-04 10:53 houyz 阅读(211) 评论(0) 推荐(0)
摘要:#include <iostream> #include <cstdio> #include <functional>//less<int> #include <algorithm> using namespace std; int main(){ int n; scanf("%d",&n); in 阅读全文
posted @ 2020-09-07 17:05 houyz 阅读(1814) 评论(0) 推荐(1)
摘要:头文件string.h #include <iostream> #include <string.h>//memset必带这个头文件 using namespace std; int main(){ int a[10][10]; memset(a,0,sizeof(a)); for(int i=0; 阅读全文
posted @ 2020-08-22 15:30 houyz 阅读(955) 评论(0) 推荐(0)
摘要:#include <iostream> #include <iomanip>//小数点必带这个头文件 using namespace std; int main(){ double t = 552.54467; double a = 3.1544545454; int b = 244; cout<< 阅读全文
posted @ 2020-08-22 15:17 houyz 阅读(609) 评论(0) 推荐(0)
摘要:c++中的结构体排序,最常用到的应该就是对结构体的某一个元素进行排序,其他元素与被排序元素关联 比如这样的结构体 typedef struct student{ int id; int math; int chinese; int english; }student; score[3]代表三门成绩, 阅读全文
posted @ 2020-08-22 15:09 houyz 阅读(2193) 评论(0) 推荐(0)