随笔分类 -  c++

摘要:内存对齐 先看一下c++结构体 struct Son { int age; int money; void run() { cout << "Person::runm()" << age << endl; } }; int main() { Son son; cout << sizeof(son) 阅读全文
posted @ 2020-07-22 09:17 Antake 阅读(136) 评论(0) 推荐(0)
摘要:struct和class区别 //默认成员权限是private class Person { //private: int age; void run() { cout << "Person::runm()" << endl; } }; //默认成员权限是public struct Son { // 阅读全文
posted @ 2020-07-21 17:10 Antake 阅读(106) 评论(0) 推荐(0)
摘要:int a = 1; int & const p = a; //实际上这里的p和指针类似,特性和指针差不多 阅读全文
posted @ 2020-07-21 15:46 Antake 阅读(266) 评论(0) 推荐(0)

Live2D