Primary articles C ++ code

Cognitive Code

I feel that learning the code by the method of analogy is a good way to learn, in the vast online world, we can make something that vitality code than Xian Qi ah ah like, the various language analogy successful method, it is very interesting but also biased. Here I C ++ analogy, initiate, hope inspire you beginners.

C ++ nouns effect Analogy nouns effect
program Provide more comprehensive services biological Able to adapt to most of the living environment
class Comprehensive numerous functions, able to handle certain events organ With a more comprehensive capability to handle certain aspects of demand
function To achieve a certain function organization It has a specific function
Code Constitute the basis cell Constitute the basis
生物X
器官A
组织a
细胞1
细胞2
组织b
细胞3
细胞4
器官B
组织c
细胞5
细胞6
组织d
细胞7
细胞8
程序X
类A
函数a
代码1
代码2
函数b
代码3
代码4
类B
函数c
代码5
代码6
函数d
代码7
代码8

When we write a program, we recommend that the code written as a function of different functions, and then the main function is executed after the function or class with a summary of the summary, especially in the larger code than the case, if you write together, but also inconvenient to read not easy to add to revise its outer also be easily deciphered.
the above.

Released three original articles · won praise 0 · Views 103

Guess you like

Origin blog.csdn.net/herry_g/article/details/104093298