The operators we have seen so far are all special characters like + and *, but there are a few operators that are words. in is a boolean operator that...
分类:
其他好文 时间:
2014-07-07 15:39:31
阅读次数:
246
如题,做报表时候,有时候要根据是否是合计行,来改变合计行的粗细,大小。可以通过字体的表达式来实现:表达式的通用写法: =iif( Fields!YourFieldName.Value operator "Value to compare", "If condition is met, use thi...
分类:
其他好文 时间:
2014-07-07 00:28:07
阅读次数:
201
模板友元函数在类内声明类外定义时都必须加模板前缀,另外模板要写在一个文件内// generates undefined error for the operator#include #include template class array { int size;public: array(); t...
分类:
编程语言 时间:
2014-07-06 19:56:39
阅读次数:
199
Divide two integers without using multiplication, division and mod operator.不用乘、除、求余操作,返回两整数相除的结果,结果也是整数。假设除数是2,相除的商就是被除数二进制表示向右移动一位。假设被除数是a,除数是b,因为不知...
分类:
其他好文 时间:
2014-07-05 20:37:18
阅读次数:
193
1、函数重载overloading:C++允许在同一范围中声明几个功能类似的同名函数,但是这些同名函数的形式参数parameter lists(指参数的个数、类型或者顺序)必须不同;int max(int a, int b);double max(double a, double b);int ma...
分类:
其他好文 时间:
2014-07-03 07:19:30
阅读次数:
244
有许多时候,我们自己编写类的operator=函数(例如,当类中包含指针时)。
考虑如下的一个类:
class Widget {
public:
Widget(int x=0): val(new int(x)) {}
~Widget() { delete val; }
Widget(const Widget &rhs): val(new int(*rhs.val)) {}
//...
分类:
其他好文 时间:
2014-07-02 09:08:20
阅读次数:
188
让编译器进行隐式类型转换所造成的弊端要大于它所带来的好处,所以除非你确实需要,不要定义类型转换函数。隐式类型转换的缺点:它们的存在将导致错误的发生。例如:class Rational {public: ... operator double() const; // 转换Rational类成doubl...
分类:
其他好文 时间:
2014-07-02 00:09:52
阅读次数:
261
google hacking事实上并算不上什么新东西,当时并没有重视这样的技术,觉得webshell什么的,并无太大实际用途.google hacking事实上并非如此简单... 经常使用的googlekeyword: foo1 foo2 (也就是关联,比方搜索xx公司 xx美女) operator...
分类:
其他好文 时间:
2014-06-30 22:50:28
阅读次数:
353
请注意:(1)确保当对象自我赋值时operator=有良好行为。其技术包括比较“来源对象”和“目标对象”的地址、精心周到的语句顺序、以及copy-and-swap。(2)确定任何函数如果操作一个以上的对象,而其中多个对象是同一个对象时,其行为仍然正确。
分类:
编程语言 时间:
2014-06-29 20:21:52
阅读次数:
157
1,new操作符实际上包含三部分:operator new分配内存和调用构造函数初始化刚刚分配的内存,类型转换刚刚的指针。string* ps = new string("lalalala");相当于void* memory = operator new(sizeof(string));call s...
分类:
其他好文 时间:
2014-06-29 19:15:07
阅读次数:
197