vector
摘要:vector分配的是一块连续内存,所以在程序运行的过程中,vector在不断的重新组织内存,这样做的效率是比较低的。
阅读全文
posted @
2014-04-28 22:46
aoun
阅读(113)
推荐(0)
MFC
摘要:Microsoft Foundation Class
阅读全文
posted @
2014-04-27 23:09
aoun
阅读(81)
推荐(0)
RTTI
摘要:Run-Time Type Identification作用: 在运行时获取指针所指到或参考到的对象型态。说明: 某些编译器默认禁止RTTI,目的是消除性能上的开销。 面向对象更提倡使用虚函数而不是RTTI机制。C++通过typeid, dynamic_cast, type_info来支持RT...
阅读全文
posted @
2014-04-25 23:14
aoun
阅读(337)
推荐(0)
better me
摘要:If I want to love her, I should more excellent first.Everyday may not a good day, but there's something good everyday
阅读全文
posted @
2014-04-20 00:32
aoun
阅读(143)
推荐(0)
LinkQueue class
摘要:1 #include 2 3 struct Node{ 4 Node * next; 5 6 Node() { next = NULL;} 7 Node(const Node & node) { 8 next = node.next; ...
阅读全文
posted @
2014-04-19 00:15
aoun
阅读(327)
推荐(0)
LinkStack class
摘要:1 #include 2 3 struct Node { 4 Node * next; 5 6 Node() { next = NULL;} 7 Node(const Node & node) { 8 next = node.next;...
阅读全文
posted @
2014-04-18 14:02
aoun
阅读(312)
推荐(0)
Queue class
摘要:1 enum Error_code { 2 succeed, 3 overflow, 4 underflow 5 }; 6 7 typedef int Queue_entry; // Now queue element is int 8 9 const int max_...
阅读全文
posted @
2014-04-18 12:31
aoun
阅读(196)
推荐(0)
Stack class
摘要:const int max_stack = 10;typedef int Stack_entry; // Now, stack data type is intenum Error_code { succeed, overflow, underflow};class Stack{p...
阅读全文
posted @
2014-04-18 11:05
aoun
阅读(361)
推荐(0)
pointer
摘要:Item x[20];Item * ptr = x;ptr = &(x[0]);ptr = &(x[i]);ptr = x + i;
阅读全文
posted @
2014-04-18 10:28
aoun
阅读(191)
推荐(0)
code for template
摘要:// A example for template// From > P273#include #include #include using namespace std;// class Appleclass Apple {public: Apple() : variety("generic...
阅读全文
posted @
2014-04-17 16:48
aoun
阅读(150)
推荐(0)
language type
摘要:Static type language: c++, Object Pascal ...Dynamic type language: Smalltalk, Objective-C ...Static type language prefer to behave object by class, ...
阅读全文
posted @
2014-04-16 15:30
aoun
阅读(230)
推荐(0)
coding style
摘要:A class should have follow 4 functions:1. default constructor2.copy contructor3.operator =4.destructor
阅读全文
posted @
2014-04-16 14:52
aoun
阅读(111)
推荐(0)
Pigeonhole principle
摘要:For example: 10 apples, 9 boxes, then at least one box have two apples.Hash table's repeat problem is inevitable, because the number of Keys is alway...
阅读全文
posted @
2014-04-14 23:57
aoun
阅读(230)
推荐(0)
MD5
摘要:Message-digest Algorithm 5
阅读全文
posted @
2014-04-14 23:40
aoun
阅读(98)
推荐(0)
Irreversible algorithm
摘要:Encryption process does not request the use of a encryption key, because the key is input plaintext itself.
阅读全文
posted @
2014-04-14 23:21
aoun
阅读(228)
推荐(0)
RFC
摘要:Request for commentsIs a series numbers scheduled file, documents collected Internet-related information, and software files for UNIX and Internet com...
阅读全文
posted @
2014-04-14 23:15
aoun
阅读(108)
推荐(0)
feof
摘要:feof's definition in stdio.h:#define _IOEOF 0x0010#define feof(_stream) ((_stream)->_flag & _IOEOF)From here we know only _flag equal to _IOEOF then feof() return 1. When file position indicator arrive to end of file, and read/write again, the fp->_flag set to _IOEOF, then call feof()
阅读全文
posted @
2014-04-10 23:15
aoun
阅读(260)
推荐(0)
Template class
摘要:Template class's decalaration and implementation should place in the header file together.If separate them, then the complier will report "unresolved external symbol ..."I know they can separate, but I need more skills, so come on.
阅读全文
posted @
2014-04-02 23:20
aoun
阅读(172)
推荐(0)