Learning a language always starts from "Hello, world! "At the beginning, I remember that I started from the C language. After learning a semester, I would only enter a few numbers or characters, and then output them after function processing. Remember int, bool, Char, printf (), getch (). In addition, basically no. In the second semester, I learned the input and output of the file stream, called some library functions for drawing, and understood the concept of processes and threads. Then I learned object-oriented C ++. I started to understand the world of computers. In fact, the world of computers is a generalization of the real world (computers are artificial computers ). In the computer, we define our world in four major directions (referencing the idea of Bai Qiao ):
1. Objects-objects, int and Char are our integers, letters, complicated ones, date and time. The reality is that there are all things. Computers cannot express each other one by one. They use classes to generalize. No matter what they are, how complicated things are in a class. Therefore, classes are also the foundation of object-oriented. When you talk about something, it is an object. For example, a cat is a class, and your cat is an object.
2. object Storage, everything in computer memory is lost after power loss. When you cannot easily create a complex object, you may want to save it, you can simply use it next time. At this time, you need to save files, registries, databases, and so on. New users may wonder what to do with so many storage methods, increasing the Learning Burden. They have their own advantages and disadvantages, such as books, paper, and painting in reality.
3. display of objects. A painting is better than a thousand words, and the object is invisible in the computer memory.ProgramHow can someone believe it? In this case, you can print strings, tables, bitmaps, and sound to make people have a perceptual knowledge.
4. Communication between objects. No independent object exists, that is, the object must communicate with the object to complete complex functions. There are many communication bridges, such as COM, DLL, network, and clipboard. If you want to tell you what you are in a crush on, you can send a message, send a note, write a love letter, and send something to tell her that you like her.
The above four points can basically summarize a world model. LearningProgramming LanguageYou can master the above four aspects without getting lost in the syntax of a specific language.