Joke Collection Website - Public benefit messages - In C, what is a message, what is a class, and what is an object?
In C, what is a message, what is a class, and what is an object?
Message: (Message? passing) refers to the object-oriented mechanism of C++ (inherited from Smalltalk) that binds member functions/methods to objects. When calling a member function/method, you must first specify the object and the operation on the specified object - such as "obj.op()". The generic method in Common Lisp Object System is another mechanism that is different from Message passing - such as "(op obj)".
A class is a group of things with the same attributes and characteristics. In C, data types that implement certain functions are defined as classes. It mainly consists of two parts: internal data and functions for operating data. These data and functions are the attributes of this class. That is, all objects defined as data types of this class have data and functions defined by this class.
An object is a developed abstraction that contains the data that needs to be manipulated and the methods that can operate on the data. Example: Define an Int type variable ?int i in C/C; where int is the class, and i is an object of the int class. The definition of a class is used to describe the properties of int, and an object is an entity with class properties.
- Previous article:Exquisite copy of tourist circle of friends
- Next article:Can ZTE Guardian Tablet make a phone call?
- Related articles
- How many short messages can Zhilian platform send at a time?
- How to turn off the short message function of telecom mobile phone
- How to deal with telephone fraud
- Is the message sent by 1069 true?
- How to activate social security card on mobile phone
- Wechat doesn't have a New Year red envelope.
- Work trends of Kaifeng Land and Resources Bureau
- Can I buy coffee with Oriental Welfare Card?
- Why does China Mobile keep saying "Sorry, the system is busy, please try again later or consult 10086"?
- Abnormal verification of Nantong Bai Tong verification code.