原创 Classes and Structures

Class descriptions look much like structure declarations with the addition of member functions and the public and priva

原创 Function Overloading

Function polymorphism(Function Overloading) is a neat C++ addition to C's capablities. Function overloading lets you us

原创 Object initialization

class Student { private: char * name[10]; int age; private: }  

原创 Inline Versus Macros

#define SQUARE(X) X*X inline square(double x) {return x*x;} Using macros to perform function-like services. This works

原创 What does "Function Call" do?

When a program reachs the function call instruction, the program stores the memory address of the instruction immediate

原创 The Usual Array Function Idiom

The idiom (pass the array name and size as arguments) works by passing two numbers--the array address adn the number of

原创 Inline Functions

Jumping back and forth and keeping trace of where to jump means that there is an overhead in elapsed time to using func

原创 How program execute?

The final product of the compilation process (廣義的編譯,包括預處理、編譯、彙編和鏈接) is an executable program, which consists of a set o

原创 Passing by value Versus Passing by reference

Passing by reference allwos a called functioto access variables in the calling fucntion. C++'s addition of the feature

原创 Reference Variables

Reference provide a convenient alternative to pointers for processing large structures with a function, and they are es

原创 Encapsulation`and Data hiding

Gathering the implementation details together and separating them from the abstration is called encapsulation. Data hid

原创 Public and Private

You can declaer class members, whether they are data items or member functions, either in the public or the private sec