Default parameters of function:
1. The default parameters of the function must be placed to the right of the formal parameters and no formal parameters without default parameters cannot appear to the right of the default parameters
2. If the function declaration gives default parameters, then the function implementation cannot define default parameters
3. No default parameters are given when declaring a member function, but the implemented member function has default parameters. You may not see the default parameters when calling (you can see them when the function implementation is placed in front),
4. Therefore, usually the default parameters are placed in the .h declaration
Polymorphism--->overload
The implementation principle of overloading: the name of the function is smashed
Function name crushing search method:
In the code, declare a function and do not implement it, but call this function in the main function, then compile, connect and check the code, and you can see the smashed name of the function in the error message.
Lesson 3 An unknown goddess
Some time ago, an interesting discovery was made by archaeologists on the Aegean (adj. Aegean; n.) island of Kea. An American team explored a temple which stands in an ancient city on the promontory of Ayia Irini. The city at one time must have been prosperous, for it enjoyed a high level of civilization. Houses--often three storeys high--were built of stone. They had large rooms with beautifully decorated walls. The city was even equipped with a drainage system, for a great many clay pipes were found beneath the narrow streets.
The temple which the archaeologists explored was used as a place of worship from the fifteenth century B.C. until Roman times. In the most sacred room of the temple, clay fragments of fifteen statues were found. Each of these represented a goddess and had , at one time, been painted. The body of one statue was found among remains dating from the fifteenth century B.C. Its missing head happened to be among remains of the fifth century B.C. This head must have been found in Classical times and carefully preserved. It was very old and precious even then. When the archaeologists reconstructed the fragments, they were amazed to find that the goddess turned out to be a very modern-looking woman. She stood three feet high and her hands rested on her hip. She was wearing a full-length skirt which swept the ground. Despite her great age, she was very graceful indeed, but, so far, the archaeologists have been unable to discover her identity.... The rest of the text>>
Error message, have you found any grammatical problems? You are missing}