2021年3月28日

摘要: setw() setfill() fixed setprecision() cout<<setprecision(n)<<num; //输出n位数字 cout<<fixed<<setprecision(n)<<num; //输出小数点后n位 cout<<setw(n)<<num; //右对齐,长度为 阅读全文
posted @ 2021-03-28 16:13 白夜just 阅读(67) 评论(0) 推荐(0) 编辑

2021年3月27日

摘要: 头文件<algorithm> 对结构体排序 struct node { string name; string phone; int birth; } a[15]; bool cmp(node x,node y) { return x.birth<y.birth ; //从大到小 } ...... 阅读全文
posted @ 2021-03-27 16:25 白夜just 阅读(69) 评论(0) 推荐(0) 编辑

导航