上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 401 下一页
摘要: 1-10ADCBDCDABB 第7题,持续不断的客流 11-20ACCCB-->ACDCBBDCBA第13题做错 They have started the () for establishing a new office. A.network B.package C.foundation D.pr 阅读全文
posted @ 2025-06-16 11:28 ChuckLu 阅读(42) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; class A { public: A(int i); void print(); const int &r; private: const int a; static const int b; // 静态常数据成员 阅读全文
posted @ 2025-06-14 22:57 ChuckLu 阅读(25) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; int main() { char *p = "Hello"; cout << *p << endl; cout << *(p + 1) << endl; cout << p <<endl; char array[] 阅读全文
posted @ 2025-06-14 20:26 ChuckLu 阅读(81) 评论(0) 推荐(0)
摘要: friend functions A friend function is a function that isn't a member of a class but has access to the class's private and protected members. Friend fu 阅读全文
posted @ 2025-06-14 17:53 ChuckLu 阅读(30) 评论(0) 推荐(0)
摘要: 这是组合数递推公式: C(n,k)=C(n−1,k−1)+C(n−1,k)C(n, k) = C(n-1, k-1) + C(n-1, k) 这个公式的来源可以从组合意义上理解,也可以从杨辉三角或归纳法来推导。 🔍 组合意义解释(最常用的推导) 我们要从 nn 个人里选 kk 个人,有两种情况: 阅读全文
posted @ 2025-06-13 21:08 ChuckLu 阅读(136) 评论(0) 推荐(0)
摘要: Order of parameter evaluation in C++ | Peter Bloomfield The low-level details of how data gets passed into a function are often overlooked by programm 阅读全文
posted @ 2025-06-13 20:05 ChuckLu 阅读(42) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; class B1 // 基类B1,构造函数有参数 { public: B1(int i) { cout << "constructing B1 " << i << endl; } }; class B2 // 基类B2 阅读全文
posted @ 2025-06-12 15:01 ChuckLu 阅读(135) 评论(0) 推荐(0)
摘要: 在C++中,析构函数的执行顺序与构造函数相反,遵循**LIFO(Last In, First Out)**原则,也就是"后构造先析构"。 基本规则: 对于你的例子: A a1; // 先构造 A a2; // 后构造 析构顺序是:a2 先析构,a1 后析构 详细说明: 1. 局部对象的析构顺序 vo 阅读全文
posted @ 2025-06-12 14:41 ChuckLu 阅读(269) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; class A { public: virtual void f() { cout << 1; } void g() { cout << 2; } }; class B : public A { public: vir 阅读全文
posted @ 2025-06-12 13:43 ChuckLu 阅读(43) 评论(0) 推荐(0)
摘要: That's the million-dollar question for many C/C++ developers! It's definitely tricky at first. Here are some effective strategies to help you memorize 阅读全文
posted @ 2025-06-10 16:30 ChuckLu 阅读(67) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 401 下一页