UnderstandingObjective-CThe features and features are described in this article. Currently, only AppleObjective-CAs a supported language. Let's just look at the details. The differences with C ++ are:
All classes in Objective-C must inherit from
C ++ class and object details, object details
1. What is a class?
1-1 Development of Program Design
1-2 process-oriented to object-oriented
1-3 class definitions
1-4 constructor destructor
Each implementation of C and C ++ supports some unique features for its host or operating system.
For example, some programs must precisely control the storage area where data is stored, or control the way a specific function accepts parameters.
#
A building block of software and wise
Over the years, many industry giants have made different metaphors for software building. Although you may not know them, you may not want to understand the heroic poems of these giants, but you should
Replacing macros with Inline:
1. inline debuggable;
2. You can perform type security check or automatic type conversion;
3. Accessible member variables.
In addition, the member functions defined in the class declaration are automatically converted
1 error lnk2005: "public: int
Solution: http://www.cnblogs.com/zealsoft/archive/2006/04/24/383567.aspx
Lnk2005 errors are often encountered in programming-repeated definition errors. In fact, lnk2005 errors are not very difficult to solve. Find
The return object differs from the app:The time when the copy constructor occurred:
1. Construct a new object A, a b = A;2. Sending or returning objects
For ordinary variables, the effect of the citation is not very obvious, for the
1. Char c = ' \72 '; The \72 in is a character, 72 is an octal number, and the ASCII code character ":" is represented.2.10*a++ a first multiplication and then self-increment (in the written test often like this kind of operator priority is easy to
C + + object modelThere are two types of data members in C + +: Static and nonstatic, and three kinds of classmember functions:static nonstatic and virtualNow the standard C + + object model:Nonstatic data members are placed within each classobject,
1. Char c = ' \72 '; The \72 in is a character, 72 is an octal number, and the ASCII code character ":" is represented.2.10*a++ a first multiplication and then self-increment (in the written test often like this kind of operator priority is easy to
A few days ago to see such a blog " Those years, we read the professional books ," There are many people think very good books, plus their own in the C + + project also read a lot of books, feel not all the books are worth spending time to see,
POD (Plain old Data) concept:
arithmetic Types (3.9.1), enumeration types, pointer types, and pointer to member types (3.9.2), and cv-qualified (Note 2 ) versions of these types (3.9.3) are collectively called scalar types. Scalar types, pod-
Using C + + with Objective-cApple's Objective-c compiler allows users to freely mix C + + and objective-c in the same source file, with a mixed language called objective-c++. With it, you can use an existing C + + class library in your OBJECTIVE-C
C++/C Code ReviewFile structureis the name of the header file and the definition file reasonable?Is the directory structure of the header file and definition file reasonable?is the copyright and version statement complete?ImportantDoes the header
For an empty class, the compiler produces 4 member functions by default: The default constructor, destructor, copy constructor, and assignment function.1. Constructor:A constructor is a special class member that is called to initialize and allocate
Swift Getting started is simple650) this.width=650; "title=" 300.jpg "src=" http://s3.51cto.com/wyfs02/M02/59/AA/ Wkiom1ta9kszfyb5aadm2rgzlmk595.jpg "alt=" Wkiom1ta9kszfyb5aadm2rgzlmk595.jpg "/>"Swift Getting Started is simple" Tsinghua University
In C + +, there are two types of class data members:static and Nonstatic, and three class member Functions:static, nonstatic, and virtual. Known as the following class Point statement:
class Point ...{ public: Point(float xval); virtual ~Point();
Write a constructor, destructor, and assignment function for a class string.Overloaded with input (>>), Output (), less than (For space reasons, there is no implementation of the strlen (), strcpy () function.String class//used for strlen, strcpy
1 The condition in the switch statement must be an integral type (that is, bool, int, long, char, and so on), an enumeration type, or a class type. If the condition is a class type, the class must have a type conversion function that converts the
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.