From C to C++(C plus plus) basic introduction

From C to C++(c plus plus)

From C to C++(c plus plus):- C language is a structured and modular language, it is process-oriented. When dealing with smaller-scale programs, programmers are more comfortable with the C language. But when the problem is more complicated and the scale of the program is larger, the structured program design method shows its shortcomings. The designer of a C program must carefully design every detail in the program, and accurately consider what happens at every moment when the program is running, such as how the value of each variable changes, when and what input should be performed, on the screen What should be output on the, etc. The requirements for programmers are relatively high. If they are faced with a complex problem, programmers often feel powerless. The purpose of the structured programming method was to solve the software design crisis, but this goal has not been fully realized. In order to solve the software design crisis, the idea of ​​Object-Oriented Programming (OOP) was proposed in the 1980s, and it is necessary to design a new language that can support object-oriented programming methods. Smalltalk is an object-oriented language. In practice, people have found that because the C language is so popular and widely used, facing the revolution of the product order design method, the best way is not to invent a new language to replace it, but to replace it. Fundamentals I: To be developed. In this situation F, C++(C plus plus) came into being. C++(C plus plus) was developed by Dr. Bjarne Stroustrup of AT&F BeH (Bell) Laboratory and his colleagues at the beginning of the 20th century on the foundation of C language. C++(C plus plus) retains all the original advantages of the C language. Object-oriented mechanism. Since C’s ten improvements to C are mainly reflected in the addition of “classes” suitable for object-oriented programming, it was originally called “C with classes” by Bjarne Stroustrup. Later, it was called j’M iMi, which was an enhanced version of C. It used the self-addition operator ++” of C to speak It’s, and was renamed C++(C plus plus). C-10 is developed from C and is compatible with C. Basically, programs written in C language can be used in C++ without modification. It can be seen from the name of C++(C plus plus) that it is a superset of C. C++(C plus plus) can be used not only for process-oriented structured programming but also for x.J image-oriented programming. It is a powerful it-compatible programming language in C++(C plus plus) “enhancement” to C. It is manifested in two aspects: (1) In the original process-oriented mechanism foundation 1, many expansions of the function of C language. (2) Added the mechanism of’the to objects. The object program design is proposed for the development of larger-scale programs, with the purpose of improving the efficiency of software development. Only those who have written large programs will truly appreciate the shortcomings of C and the advantages of C++(C plus plus).

Do not oppose object-oriented and process-oriented. Object-oriented and process-oriented are not contradictory, but each has its own uses and complements each other. The knowledge of structured programming is still needed in object-oriented programming. For example, defining a function in a class requires a structured programming method to implement it. Any program design needs to write operation code, and the specific operation process is process-oriented. For simple problems, the eight-link process-oriented method can be easily solved. Two readers after learning C++(C plus plus), can not only carry out process-oriented structured programming but also object-oriented programming. Since the readers of this book have already grasped the method of process-oriented programming in the study of C programming, the knowledge of C++ object-oriented programming is introduced in the book.

Related Article:




Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Check Also
Back to top button