![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c++
Penta_QQQ
这个作者很懒,什么都没留下…
展开
-
c++初学
三目运算符c中 不可作为左值c++ 可作为左值 但不可用常数const int a = 10;c 有c++ 无 符号表const define 区别1,#define没有类型2,#define预编译(文本替换)const 编译期3,定义复杂类型const - struct- class引用 & 有自己的存贮空间本质 1 别名 int a = 10int ...原创 2019-08-01 20:22:25 · 99 阅读 · 0 评论 -
c++笔记
struct与class区别struct(c)class 有成员函数 默认权限 private(c++) struct 默认权限public类模板 class 可以表示模板类型 struct 不可以#ifndef STUDENT_H 防止重复定义#define STUDENT_H#endif域解析符::void student::set_age( )返回值 类名::函数名(参...原创 2019-07-12 09:14:10 · 72 阅读 · 0 评论 -
::域解析符的作用·
指定命名空间 返回值 类名::函数名(参数) void student::set_age( ) 静态成员的初始化 int test::b = 0; static成员函数 Test::print(); 调用友元函数 friend void A::test(B&b); 父类 子类 同名函数...原创 2019-07-19 21:33:23 · 672 阅读 · 0 评论 -
c++模板
stl 标准模板库 模板声明 模板参数表 template<calss T> <返回值类型> 函数名(函数形参表) 普/模 普/模template <class T>T max1(T a,T b){ ...原创 2019-07-20 15:34:30 · 81 阅读 · 0 评论