04 2014 档案
摘要:本文涉及对象的赋值和复制(也称为克隆)。必要时,先看谭浩强教材P291-295的相关内容或PPT,重温一下有关概念。 一、一般情况 先看一个例子://例程1#include using namespace std;class Complex{public: Complex(){real=0...
阅读全文
摘要:一、系统跟踪类Trace的设计过程:step1:简单版class Trace {public: Trace() { noisy = 0; } void print(char* s) { if(noisy) print("...
阅读全文
摘要:打开【百度首页】,依次输入以下内容:【你想要搜索的网盘文件关键词】+【site:pan.baidu.com】,然后按一下“百度一下”就万事大吉了!例如:C++site:pan.baidu.com
阅读全文
摘要:m_label = new QLabel(); ui->stackedWidget->addWidget(m_label); ui->stackedWidget->setCurrentWidget(m_label);ui->stackedWidget->removeWidget(m_la...
阅读全文
摘要:声明:这篇文章非本人所写,转自:http://coolshell.cn/articles/4119.html昨天写了一篇如何学好C语言,就有人回复问我如何学好C++,所以,我把我个人的一些学习经验写在这里,希望对大家有用。首先,因为如何学好C语言中谈到了算法和系统,所以这里就只谈C++语言。C++是...
阅读全文
摘要:出处:http://blog.csdn.net/pony_maggie/article/details/6748662很多人都知道指针访问比数组访问效率高, 但很少人明白其中的原理, 这篇文章从汇编级别上分析一下原因.我用一个"reverse"函数来作为例子, 分别用指针和数组的形式来实现这个函数....
阅读全文
摘要:这周阅读了《架构师之美》,感觉无论是系统架构师还是软件架构师都是一个比较有挑战性的岗位,无论在技术的深度和技术的广度都有很高的要求。不仅需要基本的编程、设计技术等等,需要技术和经验的沉淀,因此并不是一般的学生就可以去应聘这个岗位的。 看这本书其实是因为看到别的同学也在看一些架构师之类的书籍,才...
阅读全文
摘要:class StringTokenizerObject to:break a string into tokens.ContructsStringTokenizer(Stringstr) Constructs a string tokenizer for the specified string....
阅读全文
摘要:一、static_cast 对于类型转换,我们常常这么做:(type) expression 引进了static_cast类型转换操作符后,我们只需这样做:static_cast(expression) 例如:int firstNumber, secondNumber;double result = ((double)firstNumber)/secondNumber;double result = static_cast(firstNumber)/secondNumber; 二、const_cast 简而言之,const_cast 最普通的用途就是转换掉(去掉)对象的 const 属...
阅读全文
摘要:1、内建函数enumeratefriends = ['john', 'pat', 'gary', 'michael']for i, name in enumerate(friends): print "iteration {iteration} is {name}".format(iteration=i, name=name) 其中 i 表示:0, 1, 2, 3; name表示:friends下标为i的内容,即friends[i]2、print()格式化输出parents, babies = (1, 1)wh
阅读全文
摘要:#include #include #include #include struct hostent *h; QByteArray ba = ui->lineEdit->text().toLatin1(); h = gethostbyname(ba.data()); if(h == NULL) { qDebug()h_addr; char *ch = inet_ntoa(*in); QString str = QString(QLatin1String(ch)); qDebu...
阅读全文

浙公网安备 33010602011771号