This is the C language, C++ learning path you need!

Hello, everyone.

The study route of C language and C++ is finally sorted out. Of course, I can only talk to you about this topic from my background development experience in communication companies for nearly three years and the world I see.

This is a lot of things very complicated, but after combing and summarizing, looking back, in fact, learning ideas, learning route should be relatively clear. Due to the personal cognition is limited, the deficiency is also welcome to add in the comments.

More learning exchange group: 1106747042

Let’s start with some interesting questions

These questions are often asked in private letters, which are also some of the doubts IN my learning process at that time.

Q: why do I learn C or C++ and still can’t make anything?

A: It’s genius to be able to do something after programming language. It should be said that even if you are proficient in linguistics, it only represents the completion of the “minimum” part, and there is still a very large gap between the actual work and the actual work, which is manifested in the following details of the four basic programming elements + practical programming.

Q: Why is everything written in C/C++ running on a black command line? Does this thing really work?

A: Hey hey, who said that the black command line running the program is useless! Linux is known for its command line interface, and many of its most powerful tools run on a black command line.

Q: What is the difference between C/C++ and Java from a technical learning and practical application point of view?

A: C/C++, which is really different from Java. C language and C++, especially C++, language granularity, mechanism, although high performance, but the language itself is really heavy burden, we are more willing to call it “wheel” language! C and C++ are powerful and fine-grained, so you can do everything. And Java itself is a service for Internet software development (back-end development + client development) language, it has an obvious “ecosystem” concept, so the application domain is very clear. I personally feel that C language and C++ programming is more difficult than Java, Java is pure application layer after all, C language and C++ are more demanding on the ability of programmers.

Job analysis

Knowing the position and knowing what you can do in the future will also help you set learning goals.

C and C++ are “wheel-building” languages that can do almost anything. But generally speaking, C language and C++ mainly do background (server) development more, including:

Communication company background development

Internet company background development

Game company background development

Of course, this background development has a lot of specific responsibilities, such as:

Do data processing and analysis

Do basic protocols and communications

Have to do the server bottom application optimization

There are even background system driver and kernel

However, the learning routes and content described below apply to all of these situations. So, let’s talk about the specific learning route.

The learning of language itself

C:

Except for the most basic syntax: variables, conditions, loops, strings, arrays, functions, structures, etc

C language is most, most important that is: pointer, memory management, after the enterprise development depends on it two meals, which is to test the C language master situation of the two standards

Recommended books: C Primer Plus, C and Pointers, C Expert Programming

C + + :

C++ and C are indeed different languages, but C++ is indeed an extension of C, which can be understood as adding object-oriented features to C. Because only with object-oriented features, code can be better reuse, extension, and engineering, which is a necessary element of large projects

In addition to all the basics of C, you need to learn the object-oriented (encapsulation, inheritance, and polymorphism) features of C++, generics, templates, STL, and so on

Recommended books (in order) : C++ Primer, Effective C++, C++ standard library, STL source code Primer, deep exploration of the C++ object model

The last tip is: the language part of the learning advice do not delay too long, must plan a good time, work hard, high intensity to it down, otherwise easy to get frustrated.

Programming foundation four major pieces

The four basic components include data structures and algorithms, computer networks, operating systems, and design patterns

This has nothing to do with what programming language to learn and what programming direction to engage in later. As long as we do programming development, these four computer foundations cannot be avoided. It can be said that these basic four 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! I am familiar with several basic data structure types, such as string, linked list, binary tree, heap, stack, queue, hash, etc. Basic algorithms, such as search, sort, dynamic programming, divide and conquer, should also be well understood.

LeetCode is advised to brush multiple questions.

Reference materials: Data Structure, Algorithm, Offer, LeetCode Brush

2. Computer networks

The computer network here refers to the TCP/IP protocol stack, which can be said to be the cornerstone of current Internet communication. In any case, we must be familiar with the TCP/IP protocol stack, mainly to learn and master the principle, including: ARP, IP, ICMP, TCP, UDP, DNS, HTTP, and HTTPS.

Recommended book: DETAILS of TCP/IP

3. Operating system

This section focuses on principles related to processes and threads (atomicity, concurrency, locking) and principles related to memory (memory distribution, memory scheduling).

Recommended book: Understanding Computer Systems in Depth

4. Design patterns

It is not necessary to memorize all 23 design patterns, but familiar ones such as singleton pattern, factory pattern, proxy pattern, policy pattern, and template method pattern suggestion.

Recommended books: Big Talk Design Patterns, Zen of Design Patterns

Practical application programming

This part involves some tools, programming environment, and specific programming practices. I should be able to do something after learning this part, or I should be able to understand some actual project code.

In practice, I will talk about it based on my previous work experience and what I have heard and seen in a communication company.

1. Use of Linux operating system

A lot of people learn C, C++ (including me) on Windows environment, and actual enterprise development is almost impossible, so Linux system must be able to, we have no choice. First, use.

Including: common Linux operation commands, basic Shell programming.

Recommended book: Birdman’s Linux Recipes

2. Compile/debug tools

The first is compilation: compilation tools!

We know that many people learn C language, C++ are similar to Visual Studio this kind of integrated IDE for code compilation, this actually also uses the compiler, but is Microsoft’s own MS compiler, and all operations are Visual. The compiler on Linux is more important. The most typical one is GCC. Some companies even have their own custom cross-compilation tools, but it doesn’t matter, as long as they are familiar with GCC, other problems are ok.

Secondly, everyone taught themselves C language, C++, with the help of an IDE like VS, you can click the button to compile the source file. The actual compiling action of an enterprise project is called make. The actual compiling action and process are written in the makefile file, so the writing rules of the Makefile are recommended to learn!

Finally, when it comes to debugging, the GDB debugging tool on the Linux platform should be used skillfully, and it will be used for debugging.

Debuging with GDB (In Chinese) and Writing MakeFile with Me (in Chinese)

3. Programming in Linux environment

Again, almost all C and C++ in the enterprise are based on the Linux platform, and there is no way to avoid this part

(1) Linux system programming

As we all know, there are various Windows apis in Windows programming system, and the use of Linux API is even more important.

(2) Multithreaded programming

This refers to the practice of multithreaded programming, which generally includes threads, resources, signals, synchronization, mutex, locks, and other specific programming methods.

(3) Network programming

Network programming here mainly refers to the programming practice of network programming API and IO function on Linux system.

Recommended books: Together, recommended must-see books include Advanced Programming for Unix Environments, Programming for Linux High-performance Servers, and POSIX Multithreaded Programming.

Make a little progress every day, Peace!