
永远的C++
文章平均质量分 85
cls555
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
讨论:new抛的std::bad_alloc异常
initial:So I use Qt a lot with my development and love it. The usual design pattern with Qt objects is to allocate them using new.Pretty much all of the examples (especially code generat转载 2010-05-11 10:18:00 · 6096 阅读 · 0 评论 -
C++转换构造技术
class Fraction {public: Fraction(int n, int d = 1) : m_Numerator(n), m_Denominator(d) {}private: int m_Numerator, m_Denominator;};int main() { int i; Fraction原创 2010-05-11 11:42:00 · 409 阅读 · 0 评论 -
C++函数不定参数
#include //要包含这个头文件#include using namespace std;double mean(int n ...) { va_list ap; double sum(0); int count(n); va_start(ap, n); for (int i = 0; i原创 2010-05-12 17:31:00 · 416 阅读 · 0 评论 -
const与重载
class SignatureDemo {public: SignatureDemo(int val) : m_Val(val) {} void demo(int n) {cout void demo(int n) const {cout /* void demo(const int原创 2010-05-12 10:52:00 · 465 阅读 · 0 评论