This is the learning route of C language and C + + you need!

Time:2020-4-3

This is the learning route of C language and C + + you need!

Hello, guys.

The learning route of C language and C + + is finally sorted out. Of course, I can only talk about this topic from my background development experience of nearly 3 years and the world to which I am aiming.

There are many miscellaneous things in this area, but after combing and summarizing, in fact, the learning ideas and routes should be clear. Due to the limited personal cognition, we welcome your comments to add the deficiencies.


Let’s talk about some interesting questions first

These questions are often asked in private letters. They are also some doubts in my study at that time.

Q:Why can’t I do anything after I’ve learned C language or C + +?

Answer:It ‘s a genius to be able to make things after programming linguistics! It should be said that even if you are proficient in linguistics, it only means that you have completed the “smallest” part, and there is still a very big gap between the actual workWide gapThis gap is shown in the following detailsFour pieces of basic programming + Application practice programming

Q:Why is everything written in C/C++ running on a dark command line? Is this really useful?

Answer:Hey, who said that the program running in the black command line is useless! Our famous Linux system interacts with users by command line, and many powerful tools in Linux are running on the black command line!

Q:From the perspective of technology learning and practical application, what is the difference between C / C + + and Java?

Answer:C / C + +, it is different from Java. C language and C + +, especially C + +, have fine granularity, many mechanisms and high performance, but the burden of language itself is really heavy. We prefer to call it a “wheel making” language! It is precisely because of the good performance and fine granularity of C language and C + + that everything can be done. Java itself is a language for Internet software development (back-end development + client development). It has an obvious concept of “ecosystem”, so the application field is very clear. I personally think that C language and C + + programming are more difficult than Java. After all, Java is pure application layer, and C language and C + + have higher requirements on programmer’s ability.


Post analysis

Understand the post, know what can be done in the future, this is also conducive to their own learning objectives.

C language and C + + belong to the “wheel making” language, which can do almost anything. However, generally speaking, C language and C + + mainly develop in the background (server side), including:

  • Background development of communication company
  • Internet company background development
  • Game company backstage development
  • ……

Of course, there are many subdivisions in the specific responsibilities of the backstage development, such as:

  • Data processing and analysis
  • Basic protocol and communication
  • It can optimize the underlying application of the server
  • There’s even a back-end system driver and kernel
  • ……

In any case, the learning routes and contents to be introduced below apply to all of the above situations. So, let’s talk about the specific learning route.


The study of language itself

C language:

  • In addition to the most basic syntax: variables, conditions, loops, strings, arrays, functions, structures, etc
  • The most important and most important part of C language is pointer and memory management. In the future, the development of enterprises depends on them. These are also two standards to test the mastery of C language

Recommended books: C Primer Plus, C and pointer, C expert programming

C++:

  • C + + and C language are really different languages, but C + + is really an extension of C language, which can be understood as adding object-oriented features to C language. Because only with the support of object-oriented features, the code can be bettermultiplexingextendandEngineering, which is a necessary element for large projects
  • In addition to all the basics of C language, you also need to learn the object-oriented (encapsulation, inheritance and polymorphism) features, generics, templates, STLS, etc. of C + +

Recommended books (in order): C + + primer, effective c + +, C + + standard library, STL source code analysis, deep exploration of C + + object model

The last tip isIt is suggested that the learning of the language should not be delayed for too long. We should plan the time well, work together, and press it down with high intensity, otherwise we will be easily discouraged.


Four pieces of basic programming

The four basic parts include:Data structure and algorithmcomputer networkoperating systemDesign pattern

This has nothing to do with what programming language to learn and what programming direction to follow. As long as we do programming development, these four computer foundations cannot be avoided. It can be said that the four basic things are really more important than programming language!!!

1. Data structure and algorithm

It can be said that this directly determines the success or failure of the interview! Several basic data structure types are familiar, such as string, linked list, binary tree, heap, stack, queue, hash, etc.; basic algorithms, such as search, sorting, dynamic planning, divide and conquer, etc.

It is suggested that leetcode should brush more questions.

reference material:Datastructure, algorithm, sword finger offer, leetcode

2. Computer network

The computer network here refers to the TCP / IP protocol stack, which can be said to be the cornerstone of the current Internet communication. In any case, you must know the TCP / IP protocol stack at your fingertips, mainly to learn and master the principles, including:ARP protocol, IP protocol, ICMP Protocol, TCP and UDP protocol, DNS protocol, HTTP protocol, HTTPS protocol

Recommended books:TCP / IP details

3. Operating system

The key points of this part include: process and thread related principles (atomicity, concurrency, lock), memory related principles (memory distribution, memory scheduling)

Recommended books:Deep understanding of computer systems

4. Design pattern

It’s not necessary to remember all 23 design patterns. Common ones are as follows:Singleton mode, factory mode, agent mode, strategy mode and template method modeIt is recommended to be proficient in mind.

Recommended books:Dahua design mode, Zen of design mode


Application practice programming

This part will involve some tools, programming environment and specific programming practice. It should be said that after learning this part, you should be able to do something or understand the code of some actual projects.

In this part of practice, I also want to talk about my previous work experience and what I heard and saw in the communication company.

1. The use of Linux operating system

Many people are learning C language and C + + (including me) in the windows environment, but the actual enterprise development is almost impossible, so Linux system must be able to, we have no choice. Let’s talk about use first.

Include:Common Linux operation commandsBasic shell programming

Recommended books:“Brother bird’s Linux private dishes”

2. Compile / debug tools

First, it is related to compilation:Compile tool!

We know that many people learn C language and C + + to compile code in the integrated ide like visual studio. In fact, the compiler is also used. It’s just Microsoft’s own MS compiler, and all operations can be visualized. However, the development in enterprises is seldom based on Windows system, so the compiler on Linux platform is more important, the most typical one isGCC, even some companies have their own customized cross compilation tools, but it doesn’t matter, as long asGCCI’m familiar with it. Other problems are not big.

Secondly, you can learn C language and C + +. You can compile the source file by clicking the button with the help of IDE like vs. The compilation action of the actual project in the enterprise is calledmake, the actual action and process of compilation are written inmakefileFile, so make file writing rules suggest learning!

Finally speakingdebugging, on Linux platformsGDBDebugging tools should be proficient in use and can be used for debugging.

References:There are no books to recommend in this part. Students with good English can read them directlyGNUOfficial websiteGCCandGDBFor documents and materials in Chinese, see debugging with GDB (Chinese version) and Mr. Chen Hao’s writing makefile with me

3. Linux environment programming

In other words, C language and C + + in enterprises are almost based on Linux platform, which we can’t avoid

(1) Linux system programming

As we all know, there are all kinds of windows APIs in Windows system programming, so the use of Linux system APIs is more important.

(2) Multithreaded programming

This refers to the multithreaded programming practice related things, generally including: threads, resources, signals, synchronization, mutual exclusion, locks and other specific programming methods.

(3) Network programming

The network programming here mainly refers to the network programming on the specific Linux systemAPIandIOThe programming practice of function.

Recommended booksThese three parts are combined. The recommended books include UNIX Environment advanced programming, Linux high performance server programming, POSIX multithreaded programming


Make a little progress every day, peace!