章节回顾:《Effective C++》第1章 让自己习惯C++-读书笔记条款49:了解new-handler的行为当operator new无法满足某一内存分配需求时,它会抛出异常,当其抛出异常以反应一个未获满足的内存需求之前,会先调用一个客户指定的错误处理函数,一个所谓的new-handler。...
分类:
编程语言 时间:
2015-04-18 10:02:51
阅读次数:
274
1 Bitwise operator Bitwise operators perform a bit wise operation on two operands. They take each bit in one operand and perform the operation with...
分类:
其他好文 时间:
2015-04-17 20:07:47
阅读次数:
434
题目:Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.链接:http://leetcode.com/problems/divid...
分类:
其他好文 时间:
2015-04-17 17:41:00
阅读次数:
90
Sightseeing
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 7421
Accepted: 2659
Description
Tour operator Your Personal Holiday organises guided bus trips ...
分类:
其他好文 时间:
2015-04-17 11:45:15
阅读次数:
136
原题如下:
The only printer in the computer science students'union is experiencing an extremely heavy workload.Sometimes there are a hundred jobs in the printerqueue and you may have to wait
for hours t...
分类:
其他好文 时间:
2015-04-16 09:08:56
阅读次数:
183
1.关于构造函数。class CA{public: CA ():m_iData(0) { } CA(int a) {m_iData =a; } CA (const CA& _obj) { m_iData =_obj.m_iData; } CA& operator = (const CA& _cOb....
分类:
编程语言 时间:
2015-04-15 22:58:55
阅读次数:
134
JAVA:1、布尔变量boolean(bool)2、final float aFinalVar=3.1415926(#define aVar 3.1415926)3、一元运算符:前缀 operator op; 后缀 op operator; 二元运算符:中缀 op1 operator...
分类:
编程语言 时间:
2015-04-15 22:40:48
阅读次数:
186
第一个const 函数的返回值类型是const。 这个const修饰没什么意义,你可以想象一下: 既然是函数的 返回值,而且是值传递的形式,是否const有什么意义。如果指针(引用)传递,怎表示返回值的内容不可修改:一般用在赋值操作中,例: const A& operator =() { ... ....
分类:
其他好文 时间:
2015-04-15 19:10:14
阅读次数:
124
考虑二元运算符@,如果x的类型为X,而y的类型是Y,x@y将按如下方式解析:--若X是类,查询作为X的成员函数或者X的某个基类的成员函数的operator@。--在围绕x@y的环境中,查询operator@的声明。--若X在命名空间N里定义,在N里查询operator@的声明。--在Y在命名空间M里...
分类:
其他好文 时间:
2015-04-14 00:19:56
阅读次数:
205
这里只记录一些swift特殊的运算符1.swift里面 = 仅仅进行赋值操作,不再向右边返回左值2.模运算的操作数可以是小数了3.Nil Coalescing Operatornil coalescing operator用来判断一个可选值是否有值,如果没有的话就赋予其一个缺省值注意这里面“??”前...
分类:
编程语言 时间:
2015-04-13 18:32:04
阅读次数:
177