自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 资源 (8)
  • 收藏
  • 关注

原创 动态类型识别 : 利用多种方法进行动态类型识别

//动态类型识别 : 利用多态进行动态识别 #include using namespace std; class Parent { public: enum{ ID = 0 }; virtual int type() { return ID; } }; class Child : public Parent { public: enum{ ID = 1 }; int t

2015-12-30 22:30:36 821 1

原创 在构造函数中抛出异常的结果

//异常处理 #include using namespace std; class Test { private: int* p; public: Test() { cout << "Test() "<< endl; p = new int[5]; throw 2; } ~Test() //在构造函数中抛出异常,因对象不完整,造成析

2015-12-30 15:27:21 524

原创 C++中异常处理

//异常处理 #include using namespace std; int Test(int i) { if(i == 1) { throw 0; } else if(i == 2) { throw 'a'; } else if(i == 3) { throw "Hello"; } else if(i == 4) { throw 0.5;

2015-12-30 10:51:08 297

转载 如何判定一个变量是指针还是非指针

//如何判定一个变量是指针还是非指针 #include using namespace std; template void isPtr(T*) { cout << "void isPtr(T*)" << endl; } void isPtr(...) { cout << "void isPtr(...)" << endl; } int main() { int i = 0; c

2015-12-29 11:02:36 833

原创 STL 中 算法的遍历和排序

//STL 中 算法的遍历和排序 #include #include #include using namespace std; void Show(int & value) //自定义的显示函数 { cout << value << endl; } int Compare(const int& a ,const int& b) /

2015-12-28 21:32:51 367

原创 STL 中 链表(双向链表)和迭代器(iterator)的使用

//STL 中 链表(双向链表)和迭代器的使用 ,,迭代器就理解成指向元素的指针 #include #include using namespace std; void ListUsage() { list l; for(int i=0;i<5;i++) { l.push_back(i+1); //压入元素 } cout << "Elements in l

2015-12-28 20:55:17 1481

原创 STL----stack 和queue的使用

//STL 中 栈和队列的使用 #include #include #include using namespace std; void StackUsage() { stack s; for(int i=0;i<5;i++) { s.push(i+1); //压栈操作 } cout << "Elements in stack is :" << e

2015-12-28 20:23:52 302

原创 STL----vector

//STL 中 向量的使用 (理解成数组类比较好理解,是用模板类实现的) #include #include using namespace std; int main() { vector array(10); cout << "Elements in array is : " << endl; for(int i=0;i<array.size();i++) {

2015-12-28 19:59:30 389

原创 类模版的使用----智能指针

// SmartPointer.h #ifndef _SMARTPOINTER_H_ #define _SMARTPOINTER_H_ template class SmartPointer { private: public: SmartPointer(); SmartPointer(T* pointer); ~SmartPointer(); T& operator

2015-12-28 15:58:00 271

原创 非类型模版参数

#include #include #include using namespace std; template void fn() { T array[N] = {0}; for(int i=0;i<N;i++) { array[i] = i+1; cout << array[i] << " "; } cout << endl; } int main() {

2015-12-28 11:02:46 395

原创 类模版的特化 及 特化的继承

#include #include #include using namespace std; template class Test { private: public: T test(T v) { cout return v; } protected: }; //类模版的特化  template class

2015-12-27 22:19:02 1757

原创 类模版的工程应用

类模版的工程应用 #include #include #include using namespace std; template class A { private: public: T Add(T a,T b); T Minus(T a,T b); protected: }; template T A::Add(T a,T b) { r

2015-12-27 20:16:12 348

原创 函数模版遇上函数重载会发生什么呢?

当函数模版遇上函数重载会发生什么呢? 函数模版可以像普通函数一样被重载 C++编译器优先考虑普通函数; 如果函数模版可以产生一个更好的匹配,那么选择模版; 可以通过空模版实参列表的语法限定编译器只通过模版匹配。 #include #include #include using namespace std; int Max(int a,int b) { cout << "int

2015-12-26 16:40:04 317

原创 C++ ----模版

#include #include #include using namespace std; template void Swap(T& a,T& b) { T t = a; a = b; b = t; } int main() { int a = 1; int b = 2; cout << "---------------自动类型推倒调用---------------

2015-12-26 15:09:50 269

原创 指针常量与常量指针

DEV-C编辑器结果: printf("---------------------------------\n"); const int* ip = &a; //常量指针,,地址可变 //*ip = b; //[Error] assignment of read-only location '*ip' ip = &b; printf("------------

2015-12-23 14:49:09 289

Flex_&_Bison.zip

介绍Flex及Bison使用的高清pdf。

2021-04-21

Linux’s IPsec implementation.pdf

描述IPsec 在Linux下的实现及背景内容,包含Linux下IPsec工具,内核IPsec支持等内容。

2021-04-21

the java programming language fourth editionArnoldGoslingHolmes06

the java programming language fourth editionArnoldGoslingHolmes06 Direct from the creators of the Java™ programming language, the completely revised fourth edition of The Java™ Programming Language is an indispensable resource for novice and advanced programmers alike. Developers around the world have used previous editions to quickly gain a deep understanding of the Java programming language, its design goals, and how to use it most effectively in real-world development. Now, Ken Arnold, James Gosling, and David Holmes have updated this classic to reflect the major enhancements in Java™ 2 Standard Edition 5.0 (J2SE™ 5.0). The authors systematically cover most classes in Java's main packages, java.lang.*, java.util, and java.io, presenting in-depth explanations of why these classes work as they do, with informative examples. Several new chapters and major sections have been added, and every chapter has been updated to reflect today's best practices for building robust, efficient, and maintainable Java software.

2014-08-30

ascii-码表

ASCII码使用指定的7位或8位二进制数组合来表示128或256种可能的字符。标准ASCII码也叫基础ASCII码,使用7位二进制数来表示所有的大写和小写字母,数字0到9、标点符号,以及在美式英语中使用的特殊控制字符(这里需要特别注意:ASCII码与标准ASCII码的位数上的区分,标准ASCII码是7位二进制表示)。 十进制编码 (对应)缩写字符(或功能/解释) 0 NUL(null) 空字符 1 SOH(start of headline) 标题开始 2 STX (start of text) 正文开始 3 ETX(end of text) 正文结束 4 EOT (end of transmission) 传输结束 5 ENQ (enquiry) 请求 6 ACK (acknowledge) 收到通知 7 BEL (bell) 响铃 8 BS (backspace) 退格 9 HT (horizontal tab) 水平制表符 10 LF (NL line feed, new line) 换行键 11 VT (vertical tab) 垂直制表符 12 FF (NP form feed, new page) 换页键 13 CR (carriage return) 回车键 14 SO (shift out) 不用切换 15 SI (shift in) 启用切换 16 DLE (data link escape) 数据链路转义 17 DC1 (device control 1) 设备控制1 18 DC2 (device control 2) 设备控制2 19 DC3 (device control 3) 设备控制3 20 DC4 (device control 4) 设备控制4 21 NAK (negative acknowledge) 拒绝接收 22 SYN (synchronous idle) 同步空闲 23 ETB (end of trans. block) 传输块结束 24 CAN (cancel) 取消 25 EM (end of medium) 介质中断 26 SUB (substitute) 替补 27 ESC (escape) 换码(溢出) 28 FS (file separator) 文件分割符 29 GS (group separator) 分组符 30 RS (record separator) 记录分离符 31 US (unit separator) 单元分隔符 32 space 空格 33 ! 34 " 35 # 36 $ 37 %

2014-08-30

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除