Why do you want the plus "+" method? Why is the "+" number written in front of the method? Many people because the terminology of the book is too professional, for the moment can not understand, understanding

Source: Internet
Author: User

This is a very popular way to explain the sentence briefly.

Within a custom class, if you customize a plus "+" method.

So in other places the header file can be used directly, without instantiating it, just by importing the header file of the class that contains the plus "+" method.

For example, the direct use of the formula should be able to understand, a pile of words to explain more and more ignorant, simple formula:

      [The Plus "+" method where the class name in the class is the plus "+" method];

In addition, this well-written class is best placed inside the. pch file, where it can be written directly into the header file name, so that it can be used elsewhere.

After you have cooked it, you can try to use the extension, and the extension will not end up with a class. Here we need to understand the extension, the simple description is: to the original class to expand some methods, and these methods of course have a purpose, can not be piled into any rubbish.

Why do you want the plus "+" method? Why is the "+" number written in front of the method? Many people because the terminology of the book is too professional, for the moment can not understand, understanding

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.