Static 关键字 C and C++
摘要:C++的static有两种用法:面向过程程序设计中的static和面向对象程序设计中的static。前者应用于普通变量和函数,不涉及类;后者主要说明static在类中的作用。 一、面向过程设计中的static 1、静态全局变量 在全局变量前,加上关键字static,该变量就被定义成为一个静态全局变量。静态全局变量有以下特点: 该变量在全局数据区分配内存; 未经初始化的静态全局变量会被程序自动初始化为0(局部变量的值是随机的,除非它被显式初始化); 静态全局变量在声明它的整个文件都是可见的,而在文件之外是不可见的; 全局和静态全局变量只在程序开始运行时初始化; 未初始化的全局和静态全局变...
阅读全文
something about code coverage planning
摘要:This milestone, my lead let me drive code coverage. So I need do a planning about this. This is my planning email sent to team: Code Coverage is a good tool to help us get the test coverage status and add test cases according to the code coverage data. We will run two round test passes in Beta. So .
阅读全文
C++之虚拟继承
摘要:定义: class B { private: B() { } friend class A; }; 将导致B无法被除A以外的其它任何class直接继承以后实例化,也就是说,在上面这个定义的基础上,如果你再定义: class C:public B{}; 将导致编译能够通过,但是无法实例化C(那当然也没用了,所以间接实现了一个无法继承的类B),但是因为A是B的友元,所以能够进入B的private区域,所以如果定义: class A:public B{}; 能够实例化A. 但是这样定义还有一个漏洞,如果在A普通public继承B的基础上再定义: class D:publ...
阅读全文
How to do a good planning
摘要:我们在计划的时候其实往往会碰到这样的问题:这个也想做,那个也想做,可是时间不够,这个不想CUT,那个也不想CUT,有时甚至分不清楚哪些重要,重要中的事情中哪些更重要。 如何解决这个问题呢,今天的感觉是...
阅读全文
Using Batch Parameters
摘要:Using batch parametersYou can use batch parameters anywhere within a batch file to extract information about your environment settings.Cmd.exe provides the batch parameter expansion variables %0 through %9. When you use batch parameters in a batch file, %0 is replaced by the batch file name, and %1
阅读全文