
C/C++
年少轻狂且纵马
2002年的第一场雪,比以往来的更早一些。。。
展开
-
报错stack smashing detected ***:terminated
stack smashing detected原创 2023-03-01 15:09:25 · 1335 阅读 · 0 评论 -
解决:error: ‘XXX’ is not a class template
error: ‘XXX’ is not a class template原创 2022-09-15 11:03:26 · 3031 阅读 · 1 评论 -
C++ setprecision 的作用范围
1. std::setprecision 作用范围:std::setprecision 对该语句之后的所有变量都起作用eg:std::cout << std::setprecision(9) << A << B << '\n';当需要A 与 B 输出都需要保留 浮点值的小数精度 为9时,只需要在最前使用即可。2. 官方示例:// setprecision example#include <iostream> //原创 2022-03-15 22:55:50 · 2013 阅读 · 0 评论 -
C/C++操作数重载函数标准库实现
1.首次使用博客,记录一下首次发现的标准重载实现 template inline bool operator==(const pair& __x, const pair& __y) { return __x.first == __y.first && __x.second == __y.second; } template inline bool原创 2017-10-18 18:05:40 · 583 阅读 · 0 评论