Many people are switching from C ++ to C #, but I learned C ++ from C. I used vs to build a C ++ project for the first time, but I was bored as soon as I first saw it. I don't know what's going on, I cannot understand the relationship between the files in it. Today, I finally figured it out that the hfile and CPP file, that is, declare in the hfile, and define in the CPP file. To understand this, we only need to understand the statements and definitions, but we are still not used to press Enter. The smart prompts in C ++ are just like those in C...
"Declaration" introduces the name to the computer and says, "What does this name mean ". The definition assigns a bucket for this name. Both variables and functions have the same meaning. In either case, the compiler allocates storage space in the "definition. For variables, the compiler determines the number of storage units occupied by the variables and generates space for them in the memory. For functions, the compiler generatesCodeAnd allocate storage space for it. A function bucket contains a pointer generated by a function name without a parameter table or an address operator. The definition can also be a declaration. If the compiler has not seen the name,ProgramThe compiler immediately allocates a storage address for the name if int A is defined by the Member. Declarations often use the e x t e r n keyword. If we declare a variable rather than define it, we need to use e x t e r n. For function declaration, e x t e r n is optional. The function name without the function body, together with the parameter table or return value, is automatically declared.
I copied the above from , I may have forgotten it next day. I should have seldom used it. This is why I remember to learn C ++ when I am doing small software. Although C # Can Do It, but not all of them are installed.