This article focuses on the C ++ language, the syntax is much simpler, so it is easy for beginners to get started. The two discard the pointer that is most likely to cause problems and completely automate the management of memory, although it brings the stability and security of the program.
Note: Because memory management is automated, the C # and Java languages have an automatic garbage collection mechanism. In C ++, the applied memory must be manually released by the programmer, if you forget this, memory leakage will occur. C ++'s rich language features make up for the following shortcomings to some extent:
◆ Some C ++ libraries have memory management mechanisms, such as STL and Boost.
◆ C ++ has smart pointers.
◆ Some C ++ libraries implement the garbage collection function.
◆ 1.1.3 cross-platform or not
Java programs run on Virtual machines), while C ++ is not. C ++ code runs directly on physical machines. From the perspective of Java and C #, C # is more like the product of the commercial struggle between Microsoft and SUN. Historically, Microsoft has supported the Java language and representative products include Visual J ++ and WFC. Later, Microsoft launched C # For a well-known reason, with a clear goal of competing with Java.
In fact, C # and Java are very similar in terms of features, not just syntax ). Both of them provide mature solutions for GUI, database access, network communication, multithreading, and other closely related aspects of actual applications to facilitate application solutions.
C ++ relies more on third-party libraries to implement these functions, because C ++ is an international standard, it takes a long time to add application-oriented features other than these languages to C ++. C # and Java are owners of commercial companies, and various actions are naturally much more agile.
But this does not mean that C ++ is about to die out ). It is undeniable that C ++ has lost some fields under the attack of C # and Java, but the C ++ language is still widely used, the important reason is that C ++ not only maintains the efficiency of C language, but also adds the object-oriented feature.
- How to Write C ++ project development and project plan correctly
- Summary Notes on learning and exploring C ++ library functions
- In-depth demonstration of high security of C ++
- Describes in detail how to accurately Write C ++ languages.
- In-depth demonstration of high security of C ++