First of all, a lot of people ask me, do you learn C++ just to make games? C++ is really only suitable for games. After all, I rarely see C++ programmers, and I rarely see C++ applications. You may scoff at these questions. “They really don’t understand.” But you’ve been studying for so long. Do you really know C++?

For C ++ programming languages (and this should apply to most, perhaps all, programming languages), it is designed in principle. Any programming language is designed to solve some problem that its creator is trying to solve. I don’t think anyone comes up with some fancy new language for no reason. Therefore, it is important to understand the purpose and principles that underpin it. C ++ was originally designed to solve system problems. Bjarne Stroustrup created C ++ to help his team solve the problem of the day, and he wanted to have a “near machine” language. Therefore, C ++ is designed to be an efficient language. As a result, it is well suited for both systems (low-level) programming and game programming. I believe this is the impression most developers have of C ++ and C.

But with the development of C ++ (not just now, but decades ago), C ++ became a “universal” language that you could use not only to solve system and game problems. As developers, we plan to solve problems. Is it us or is it our client? Programming languages are just tools. There are no good tools for your job, only the right tools. Whether to choose C ++ for my job. Here are a few things to consider, personal advice of course.

1. What do I work on? If I were to modify an existing project, I would use the same language unless I had a major problem that I couldn’t solve. For example, if I have a Java code base, but I need some functionality to interact directly with a graphics library, I might consider creating a JNI interface to interact with a dedicated C ++ / C library. 2. System constraints. If my program needs to run on a resource-limited or even powerful system, it is a heavy burden. That means I have to think about efficiency, and I prefer C ++. C ++ is designed to say “you don’t need to pay for things you don’t need”. I have complete control over what the program will consume from the system. I don’t have to worry about memory consumption for simple structures because garbage collection leads to additional attributes. 3. Cross-platform. If my program needs to run on another platform without recompiling, C ++ is definitely not an option. Consider languages like Java/C# here. However, if I were allowed to provide different goals for different platforms, C ++ would be in the list given what was mentioned above. 4. Resource tradeoffs. This has more to do with project management, but language selection is also a part of it. We have limited resources (time, number of developers, etc.) and project goals (ease of use, high performance, etc.). Which is the most important? Time? User interface? Performance? Before deciding which language to use, make sure you understand what you’re really trying to accomplish. Never choose a language for its own sake. Choose the appropriate language.

It always helps to know the tools. When you want to cut paper, you can choose to use a paper cutter or scissors. If you don’t know what a paper cutter is and what it does, can you make the right decision? If you want to cut paper straight, do you choose scissors?

People tend to make good decisions in life, but when it comes to programming, most of us just seem to forget. Language is just a tool.

If you want to learn, it is suggested to join this group to chat, discuss with seniors, you will also get a lot of help. Can also exchange learning experience, technical problems, you can get PDF books source code, tutorials and so on for free use.