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.