How to better learn the C ++ language?

Source: Internet
Author: User

C ++ should be easy to learn, and should be gradual. Some people often say that C language should be learned before learning C ++. In fact, it is not necessary. As long as you can understand the composition of C ++ and some syntaxes of C ++, I believe you will get many secrets from it.

Since programming requires some small programs to solve small problems, there is no need to directly learn C ++. I think loop, Judgment, jump, and pointer are the most basic programming ideas, it is helpful to learn C ++ later.

I suggest that you learn C Well first, not only in C syntax, because the ultimate goal of learning programming is to solve practical problems, therefore, we need to properly master the ability to link actual problems with programming. I recommend C programming language (version 2nd). This book was written by the father of C language, it not only introduces C syntax in detail, but also provides a lot of practical small problems as an example. It can be said that after reading this book, it will lay a solid foundation for future programming learning!

After learning "C programming language (version 2nd)", you can start to learn C ++. At the beginning, there is no need to drill down a deep big book, the Chinese version of Essential C ++ is very suitable for beginners. After reading it in a week, you can quickly get a full picture of C ++, although not familiar with C ++ immediately.

We are not able to solve the problem of "buy a chicken for a hundred dollars". There are still many non-functional problems in the real implementation of the Program. For example, how can we use less memory? How can we make it faster? After getting familiar with a language, you must carefully learn the data structure! The data structure ensures that our programs can run efficiently. The data structure Algorithm and Application C ++ language description is a good book. It provides many practical examples, such as train station scheduling, maze, compared with the problem of "buy a chicken for a hundred dollars", the problem has become more advanced.

Next we will focus on improving C ++. We can select C ++ programming ideology, and then we will look at hybrid C ++ Chinese Version 2nd Edition and More efficient C ++ Chinese version. these two books introduce the valuable experience of using C ++ efficiently, and the language is humorous. Now, you can claim to be a C ++ programmer. Congratulations!

The following describes several books that interest you. If you want to use C ++ to develop software efficiently, STL must learn it! C ++ standard library-self-repair Tutorial and reference manual can help you learn how to use STL, and you can use it as a manual during development, with the basis of the previous data structure, learning STL is not difficult.

If you want to know the design ideas and principles of STL, you may wish to take a look at generic programming and STL. Some may ask how the object-oriented mechanism of c ++ is implemented? The in-depth exploration of the C ++ object model gives you the answer, which analyzes the underlying implementation of C ++. Finally, if you want to have a C ++ encyclopedia, it is not the special edition of C ++ programming language! This book is the masterpiece of Bjarne Stroustrup, the father of C ++.

So far, you have mastered the C ++ language, and now you need to improve the design idea, object-oriented OO) the biggest feature is to shift our attention from the system's execution architecture to the concept architecture, so it is easier to develop large systems using OO.

However, we can often see that people solve problems with the process-oriented idea of C ++. What is lacking is the object-oriented design idea. No wonder, the books you read earlier didn't teach you how to develop a system using the object-oriented method. At most, I introduced what the object-oriented method is. After reading so many books, I will inevitably give priority to them first.

The ideas in C language programming or the first programming book you read may affect us. This gap is remedied by the design pattern-the basis for reusable object-oriented software! The so-called model is a systematic structure summarized by our predecessors. The design model shows 23 classic models. Through learning and understanding, you can see what is real object-oriented.

After reading "design patterns-the basis for reusable object-oriented software", you may want to take a look at "refactoring-improving the design Chinese version of existing code". after learning the object-oriented design idea, you can review your C ++ programming level at a certain height.

Pay attention to multiple practices when learning C ++ programming! It is a good way to go to a professional forum to discuss with you. You will find many enthusiastic friends to study with you. Isn't it better to make friends by learning programming? Finally, I hope you can become an excellent programmer and contribute to the development of Chinese software.

  1. Differences between standard input implementation methods in C and C ++
  2. How does the C ++ compiler allocate storage space for Const constants?
  3. Basic Conception and method of C ++ Class Library Design
  4. Several Methods for converting C ++ Language
  5. How to better compile C ++ code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.