自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 问答 (1)
  • 收藏
  • 关注

Day 7: Object-oriented programming and inheritance

3 primary features of OOPEncapsulationInheritancePolymorphism

2011-06-29 16:05:59 91

Day 6: User-defined datatypes

classA user-defined datatype which groups together related pieces of informationInstanceAn instance is an occurrence of a classclass student{public: char *name; int studentID;...

2011-06-29 15:32:47 102

Day 5: Pointers

&x evaluates to the adress of x in memory.*(&x) evaluates to the someting as x. Pointer advantages:More flexible pass-by-referenceManipulate comlex data structure efficientlyUse p...

2011-06-28 23:01:22 88

Day 4: Arrays and Strings

Array fixed number of elements of the same type stored sequentially in memoryinitialization, or unexpected resultsarrays are passed by referencemultidimensional arrays are merely an abstrac...

2011-06-26 15:51:48 106

Day 3: Functions

Why define your own functions?ReadabilityMaintainabilityCode reuse#include <iostream>using namespace std;int raiseToPower(int base, int exponent) { int result = 1; for (int i...

2011-06-26 15:25:03 61

Day 2: Flow of control

Control structureconditionalsifswitchloopswhiledo...whilefornested control structures这些都跟java是一致的,谁叫java是从C++改过来的呢?

2011-06-24 22:27:15 118

原创 Day 1:Introduction

1.1 Why use a language like C++ ConcisenessMaintainabilityPortability1.2 The compilation process         sorce file>>>Prcessed code>>>Object file 1.3 General note...

2011-06-24 22:01:44 67

Circular doubly linked list and implementation

 class Node<E>{ E item; Node prev, next; Node(E newItem){ item = newItem; prev = next =null; }}class CircularDoublyLinkedList{ private ...

2011-05-09 18:37:42 119

由preOrder和inOrder构建二叉树

Let us consider the below traversals:Inorder sequence: D B E A F CPreorder sequence: A B D E C FIn a Preorder sequence, leftmost element is the root of the tree. So we know ‘A’ is root for...

2011-05-09 16:29:41 948

二叉树和图:确定能否从一个点遍历到另一个节点

Use recursion and traversal to solve.boolean BSTbranch(TreeNode start, TreeNode end){ if(start == end) return true; if(start != null){ if(!BSTbranch(start.left, end){ if(...

2011-05-06 12:54:01 223

空空如也

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

TA关注的人

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