C++基础
文章平均质量分 52
天晨。
这个作者很懒,什么都没留下…
展开
-
C++11的新特性详解
C++111 静态断言 可以直接添加提示内容static_assert(sizeof(int)==2, "no support 16");2 解决了>> 符号的混淆 如 会被识别位右移符号//如:typedef std::vector<std::vector<bool> >Flags; //在早期必须分开 因为优先度 不同 会别解析位 右移符号3 扩展的friend的声明 可以声明一个声明的类,类的别名,或者未声明的类为友原元//如果类未声明,要使其为原创 2022-03-25 00:20:41 · 892 阅读 · 0 评论 -
C++异常处理try-catch
C++异常处理try-catch#include <iostream>#include <cmath>using namespace std;int main(){ double triangle(double, double, double); double a, b, c; cin >> a >> b >> c; try { while (a>0&&b>0&c>0) {原创 2021-11-12 15:38:10 · 708 阅读 · 0 评论