Principles of computer composition →dos commands → assembly language → C language (excluding C + +), code writing specification → data structure, compiling principle, operating system → computer network, database principle, regular expression → other languages (including C + +), architecture ...
Advice to learning programmers:
Eye times than hand over again!
Look at thousands of lines in a book!
The hand knocks thousand line is inferior out line!
Tan Buyuan code Thousands of lines as a single step corresponding to the assembly line!
An instance of a step class "construct" or "copy" or "act as a function parameter" or "return as a function return" or "participate in various operations" or "exit scope" corresponds to the assembly code of a few steps, it will come to the class's "constructor" or "copy constructor" or "operator overloading" or "destructor" corresponding to C/ + + source code.
VC Debugging Press Alt+8, Alt+7, alt+6 and alt+5, open the Assembly window, Stack window, Memory window and register window to see each of the C corresponding assembly, stepping and observing the corresponding stack, memory and register changes, so do not know everything.
For the VC, the so-called ' debug ' is compiled after the connection through, press F10 or F11 key step after step, or in a row by F9 set a breakpoint after the F5 execution stopped at the time.
(Turbo C or Borland C is debugged with the Turbo debugger, when debugging with GDB under Linux or UNIX, look at each c corresponding assembly and step through to observe the corresponding memory and register changes.) )
To understand the C pointer in essence, you must learn the correspondence between the Assembly and the C and the Assembly.
Understanding and learning the C language pointers from a compilation perspective can be very simple as something that looks complicated!
The pointer is the address. "What's the address again?" "" can only be explained from the angle of assembly language and the principle of computer composition. ”
But I have to admit:
There are those who like or are fit to learn and understand complex things in a "first concrete and abstract" way;
Others like it or are appropriate to learn and understand complex things in a "first abstract and concrete" way.
And I myself belong to the former.
In this life do not look at memory address and memory value; Just draw a list, pointers, stacks, draw all kinds of, and even did not draw themselves and only read the pictures on the book ... Is it possible to understand pointers in nature and to understand function parameters? I deeply doubt!
This life does not grow wheat not to take wheat grain to grind, eat only steamed bread, eat noodles, eat bread 、...... Have never even seen how others steamed buns, pressed noodles, toast, ... Can you understand flour in essence and understand pasta? I deeply doubt!!
Remind:
"Learning to write programs in assembly language"
And
"VC debug (TC or BC with TD debugging) when pressing Alt+8, Alt+7, alt+6 and alt+5, open the Assembly window, Stack window, Memory window and register window to see each c corresponding assembly, step into and observe the corresponding stack, memory and register changes, so you do not understand everything.
(Linux or UNIX can be debugged with GDB, look at each c corresponding assembly and step into the corresponding memory and register changes.) )
To understand the C pointer in essence, you must learn the correspondence between C and the assembly. ”
Not the same thing!
Do not superstition books, test questions, teachers, replies;
Be superstitious about CPUs, compilers, debuggers, and running results.
And please combine the "blind Touch the Sun" and "sail the boat must only bring a compass." "To be understood.
Any theory, authority, legend, Truth, Standard, interpretation, imagination, knowledge ... Compared to the facts in front of them!
Someone said a set of things, you believe he said or believe him to do?
In fact, strictly speaking, all through the world, everyone is saying a set of things, isn't it?
Don't write code that doesn't even predict the result yourself!
Computer memory is just a one-dimensional binary byte array and its corresponding binary address;
The human brain sees some parts of this one-dimensional binary byte array and its corresponding binary addresses in computer memory as integers, signed/unsigned numbers, floating-point numbers, complex numbers, English letters, Arabic numerals, Chinese/Korean/French ... Character/string, function, function parameter, heap, stack, array, pointer, array pointer, array of pointers, array of pointers, pointer to two-dimensional array, character lattice, character stroke coordinates, black and white two value picture, grayscale image, color picture, audio recording, video, fingerprint information, ID card information ...
Why should there be a data structure for this stuff?
Because the real world or abstract theory of the various data stored in the computer external memory (CD-ROM, hard disk, USB stick ...). ) or memory (ROM, RAM, SRAM ...) ) inside the binary byte array.
Then let the CPU this will only perform pre-saved subtraction shift conditions transfer ... The guys waiting for the machine instructions are going to handle the data according to the person's will. As for how to deal with this is called algorithm.
It is recommended to use the Winhex software to view raw byte content in a hard disk or file or memory.
Tips for Learning programmers