Error c2572 redefinition of default parameters

Source: Internet
Author: User

To save trouble, copy and paste the function after it is declared, and error c2572 is displayed.RedefinitionDefault parameters

As the name suggests, this default parameter is defined multiple times. In a file (or a scope), you can only specify the default value for the form parameter.

When a real parameter is compiled, the header file is combined with the source file, and the default parameter is specified multiple times.

Therefore, we only need to declare this default parameter once in the header file or the source file, so we are used to declaring this parameter in the header file.

Note: This error is only caused by compilation system problems. Some compilation systems will not report this error!


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.