Function Summary 1

Source: Internet
Author: User

overloaded functions in C + +: function names are the same, function parameters (containing types, number, order of type parameters, such as (int,double) and (Double,int)) are different, and the return value is arbitrary. When an overloaded function is called, the function selection is automatically performed based on the passed-in argument compiler.
Overloaded: The method name in the class is the same, but the parameter list is different.
Overriding: Is a subclass of the implementation method override of the parent class (overriding the parent class method).
The function parameter can be given a default value, and the default value can only be given from right to left, such as void print (int *a,char ch= ", bool IsTrue = True) {}
In overloading, an overloaded function that is given a default argument is encountered
Dummy parameters (only types, no variable names): No practical, workaround conflict, version compatibility is resolved.
Each time the function runs, it will request a stack to store the function space.
Inline (inline function keyword): Improves function invocation performance. Apply this function to the compiler to want to be an inline function, if not successful, or will apply stack space, the function body does not have too much code and complex logic, will agree to the application.

Function Summary 1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.