Correction of mixed OC and C ++ compilation errors

Source: Internet
Author: User

Because the current project uses some C ++ code, there are a lot of problems, record it here

1. modify the configuration to objective-C ++.

I have never insisted on modifying this configuration before. I want to modify the C ++ code and finally gave up. For the reason, refer to this article.

2. Enumeration value error

When the project is changed to objective-C ++, many problems occur. The main error lies in the sdwebimage library. The following method should be used to declare enumerated values:

Typedef ns_enum (nsinteger, sdwebimageoptions) {sbwebimagenone = 0, sdwebimageretryfailed = 1 <0, sdwebimagelowpriority = 1 <1, sdwebimagecachemoryonly = 1 <2 };

This is the previous statement.

Typedef Enum {sbwebimagenone = 0, sdwebimageretryfailed = 1 <0, sdwebimagelowpriority = 1 <1, sdwebimagecachememoryonly = 1 <2} sdwebimageoptions;

For enumeration, I wrote this blog by referring to this elder brother.

3 <left shift operator

I don't want to write more about it. This is the foundation of the foundation... No, I don't know what it means to ask the Daniel. I don't even know what the tragedy means. I want to fill in the basic knowledge ~!!

I haven't written a blog for a long time. Write it here first.

Related Article

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.