随笔分类 - 00.C/C++
摘要:If a copy of the libraries is physically part of the executable, then we say the executable has been statically linked.if the executable merely contains filnames that enable the loader to find the pro...
阅读全文
摘要:Objects in C must have exactly one definition, and they may have mutiple external declarations.Definition: occurs in only one place. specifies the type of an object; reserves storage for it; it is use...
阅读全文
摘要:Symbol Meaning static Inside a function, retains its value between callsAt the function level, visible only in this file. extern Applied to a function definition, has global scope(and is redundant)App...
阅读全文
摘要:每种类型,无论是内置类型还是类类型,都对该类型对象的一组(可能为空的)操作的含义进行了定义.比如,我们可以将两个int值相加,运行vector对象的size操作,等等.这些操作定义了用给定类型的对象可以完成什么任务.复制构造函数,赋值操作符和析构函数总称为复制控制(copy control).编译器自动实现这些操作,但类也可以定义自己的版本.复制构造函数: 直接初始化 和 复制初始化.string...
阅读全文
摘要:算术转换(arithmetic conversion) 整型提升(integral promotion)指针转换转换为bool类型转换与枚举类型转换为const对象显式转换satic_cast, dynamic_cast, const_cast 和 reinterpreter_caststatic_cast:编译器隐式执行的任何类型转换都可以由static_cast显式完成.当需要将一个较大的算术...
阅读全文
摘要:模板形参不必全都是类型. 在调用函数时非类型形参将用值代替,值的类型在模板形参表中指定.e.g.:
阅读全文
摘要:指向常量的指针 和 常量指针在下面的声明中,圆括号是必不可少的:int *ip[4]; // array of pointers to intint (*ip)[4]; // pointer to an array of 4ints
阅读全文
摘要:int (*)[NUM] 与 int *[NUM] 区别:数组指针,指针数组前一个的本质是指针,后一个的本质是数组。 int (*w)[TEAM_NUM] =(int (*)[TEAM_NUM] ) w1;
阅读全文
摘要:http://www.codeblocks.org/Code::Blocks is afree C++ IDEbuilt to meet the most demanding needs of its users. It is designed to be very extensible and fully configurable.Finally, an IDE with all the featuresyouneed, having a consistent look, feel and operation across platforms.Built around a plugin fr
阅读全文

浙公网安备 33010602011771号