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 |
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.