摘要: 1980s早期,把硬盘的物理扇区制作成512字节成为主流标准. 1956年硬盘发明的时候扇区容积更小. 1998年,NSIC提出使用更大容积的物理扇区,因为传统的512字节的扇区标准对日益增长的磁盘密度已经是限制了. 随之而来的是Advanced Format. 第一代Advanced Format 阅读全文
posted @ 2019-12-24 14:02 相印 阅读(828) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2019-12-22 23:00 相印 阅读(4) 评论(0) 推荐(0)
摘要: 1, 拷贝构造函数的参数必须是"const"和"引用"类型,特别是const,漏掉了会报错.g++的报错还强一点,clang的报错简直找不到边. 2,构造函数抛异常会导致析构函数不被执行. 阅读全文
posted @ 2019-12-21 14:54 相印 阅读(180) 评论(1) 推荐(0)
摘要: https://www.jianshu.com/p/4bf4d1860588 阅读全文
posted @ 2019-12-21 13:15 相印 阅读(457) 评论(0) 推荐(0)
摘要: class A { public: int a; void showthis() { printf("from A,this:%p\n", this); } }; class B { public: int b; void infothis() { printf("from B,this:%p\n" 阅读全文
posted @ 2019-12-21 10:52 相印 阅读(250) 评论(0) 推荐(0)
摘要: You can: Derived(const Derived& d) : Base(d) { cout << "Derived::Derived(const B&)" << endl; } This calls the Base copy constructor on the Base sub-ob 阅读全文
posted @ 2019-12-21 10:02 相印 阅读(231) 评论(0) 推荐(0)
摘要: https://en.cppreference.com/w/cpp/language/using_declaration 在[Inheriting constructors]这一节. 其实叫做"基类的构造函数前置"比较好. 像mystring继承自string类,但仍然是提供字符串功能.new的时候 阅读全文
posted @ 2019-12-21 03:14 相印 阅读(1354) 评论(0) 推荐(0)
摘要: 王垠 编程的宗派 阅读全文
posted @ 2019-12-18 07:07 相印 阅读(111) 评论(0) 推荐(0)
摘要: * 支持类内初始化. class A{ vector<string> strs{"abc", "def"}; }; 阅读全文
posted @ 2019-12-17 23:53 相印 阅读(131) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/wangshubo1989/article/details/49748703 这篇讲到了vector的push_back的两种重载版本,左值版本和右值版本. 阅读全文
posted @ 2019-12-17 22:01 相印 阅读(350) 评论(0) 推荐(0)