Aditya Bhawarcoderab.hashnode.dev·Sep 29, 2023C++ IntroductionC++ is a versatile and powerful programming language that finds wide application across various domains. Originally developed as an extension of the C programming language, C++ encompasses both procedural and object-oriented programming paradigms. It...C++ Tutorials#cpp #guide
qilingzhaoqilingzhao.com·Aug 18, 2023侯捷cpp-oop(下) 笔记C++程序设计兼谈对象模型-导读 conversion function, 转换函数 class Fraction { public: Fraction(int num, int den=1) : m_numerator(num), m_denominator(den){}; operator double() const { return 1.0 * m_numerator / m_denominator; } private: int m_n...cpp-note
qilingzhaoqilingzhao.com·Aug 13, 2023侯捷cpp-oop(上) 笔记头文件与类声明 Classes 两个分类 Class without pointer member(s): complex Class with pointer member(s): string 也可以分为 Object-Based vs Object Oriented 构造函数 inline函数 函数如果在 class 内定义完成,则自动成为 inline 候选人. 也可以在class 外部定义,方法需要增加inline 关键字。 constructor(ctor, 构造函数) ...cpp-note