From C to C++ basic introduction

(Last Updated On: April 2, 2021)

From C to C++

C language is a structured and modular language, it is process-oriented. When dealing with smaller-scale programs, programmers are more comfortable with 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++ came into being. C++ 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++ 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 44 ++” of C to speak It’s, and was renamed C ++. 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++ that it is a superset of C. C++ 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 Ii C++ “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’rh1 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++.

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++, can not only carry out process-oriented structured programming but also object-oriented programming. Since the readers of 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 C++ Programming category.

Amazon Purchase Links:

Top Gaming Computers

Best Laptops

Best Graphic Cards

Portable Hard Drives

Best Keyboards

Best High Quality PC Mic

Computer Accessories

*Please Note: These are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!

Recommended For You

About the Author: Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Leave a Reply