自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

原创 friend function & Overloading <<

In short, a friend function to a class is a nonmember function that has the same access rightsas a member function.mytime3.h// mytime3.h -- Time clas...

2011-12-26 14:16:31

阅读数 18

评论数 0

原创 C++ Operator Overloading (操作符重载)

Operator overloading is an example of C++ polymorphism.class header file:// mytime0.h -- Time class before operator overloading#ifndef MYTIME0_H_#def...

2011-12-22 18:31:01

阅读数 19

评论数 0

原创 An Array of Objects

Example program:头文件:// stock2.h -- augmented version#ifndef STOCK2_H_#define STOCK2_H_class Stock{ private: char company[30]; int shares; double shar...

2011-12-22 16:37:10

阅读数 18

评论数 0

原创 Namespaces

Traditional C++ NamespacesNew Namespace Featuresusing Declarations and using Directivesusing Directives Versus using DeclarationsUnnamed NamespacesNa...

2011-12-21 15:24:51

阅读数 69

评论数 0

原创 The Placement new Operator

Normally, the new operator has the responsibility of finding in the heap a block of memorythat is large enough to handle the amount of memory you req...

2011-12-20 17:07:35

阅读数 12

评论数 0

原创 C++ Storage Duration, Scope, and Linkage

1.Automatic storage duration—Variables declared inside a function definition—includ-ing function parameters—have automatic storage duration. They are...

2011-12-20 15:16:32

阅读数 20

评论数 0

原创 storage class specifier & cv-qualifier

storage class specifier (存储类说明符):autoregisterstaticexternmutable参考:变量的存储布局         extern和static关键字cv-qualifier (const volatile 限定符): constvolatile参考...

2011-12-20 12:18:46

阅读数 25

评论数 0

原创 C++ Primer, Fourth Edition 中英文对照在线阅读

 C++ Primer, Fourth EditionBy Stanley B. Lippman, Josée Lajoie, Barbara E. Moo...............................................Publisher: Addison Wesle...

2011-12-19 16:59:28

阅读数 33

评论数 0

原创 Template Explicit Specialization (模板显式特化)

这部分有点复杂,我还没理解清楚,以后再说吧,可参考这篇文章:http://www.9wy.net/onlinebook/CPlusPlusPrimer/ch16lev1sec6.html

2011-12-19 16:47:06

阅读数 19

评论数 0

原创 Function Templates (函数模板)

Contemporary C++ compilers implement one of the newer C++ additions: function templates.A function template is a generic function description; that i...

2011-12-18 22:38:00

阅读数 25

评论数 0

原创 Reference 引用

C++ adds a new compound type to the language—the reference variable. A reference is a namethat acts as an alias, or an alternative name, for a previo...

2011-12-16 14:54:29

阅读数 13

评论数 0

原创 C++ Inline Functions (C++ 内联函数)

Inline functions are a C++ enhancement designed to speed up programs. To use this feature, you must take at least one of two actions:1. Preface the f...

2011-12-15 18:25:19

阅读数 15

评论数 0

原创 C++ Annotations Version 9.0.2

荷兰Groningen大学教授Frank B. Brokken把他的C++课程讲义公开在他的个人网站上了。 C++ Annotations Version 9.0.2或者这个链接:http://cppannotations.sourceforge.net/cppannotations/html/....

2011-12-15 17:43:44

阅读数 19

评论数 0

原创 Function Pointer (函数指针)

Obtaining the address of a function is simple: You just use the function name without trailingparentheses. That is, if think() is a function, then th...

2011-12-15 17:09:50

阅读数 23

评论数 0

原创 C++Recursion , recursive function ( C++递归 , 递归函数) 两个程序范例

 Example 1:// recur.cpp -- using recursion#include &amp;lt;iostream&amp;gt;void countdown(int n);int main(){ countdown(4); // call the recu...

2011-12-15 11:39:32

阅读数 56

评论数 0

原创 Namespaces

If you use iostream instead of iostream.h, you should use the following namespace directiveto make the definitions in iostream available to your prog...

2011-12-14 17:06:17

阅读数 18

评论数 0

原创 Thinking in C++

网上有两个HTML格式的Thinking in C++Thinking in C++ 2nd ed (Beta) Version TICA18Thinking In C++ Second Edition Bruce Eckel

2011-12-13 22:18:38

阅读数 27

评论数 0

原创 C++ Nested Class (C++嵌套类)

In C++, you can place a class declaration inside another class. The class declared withinanother is called a nested class, and it helps avoid name cl...

2011-12-13 14:57:27

阅读数 25

评论数 0

原创 Friend function 友元函数

#include &amp;lt;iostream&amp;gt;#include &amp;lt;string&amp;gt;using namespace std;class ca { string id; void setId(string s) ...

2011-12-13 12:46:45

阅读数 10

评论数 0

原创 C++ Class Template (C++类模板)

头文件// stacktp.h -- a stack template#ifndef STACKTP_H_#define STACKTP_H_template &amp;lt;class Type&amp;gt;class Stack{private: enum {MAX = 10...

2011-12-07 18:23:46

阅读数 23

评论数 0

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