Differences between C and C ++

Source: Internet
Author: User

C is a structured and modular process-oriented language, and C ++ is an object-oriented Program design language. C ++ is a superset of C language. That is to say, you have learned C language. As for the difference, it should be said that it is the difference of programming ideas. C is based on the process, emphasizing the functions of the program and taking functions as the center. C ++ is object-oriented, emphasizing program hierarchy and classification, and defining and displaying objects based on abstraction, that is, program design. The specific term. We recommend that you learn how to think and program in an object-oriented way when learning C ++. Currently, when developing large projects, they all use object-oriented analysis and design technologies.

there are many differences between C and C ++:
1. The C language is process-oriented, while C ++ Is Object-Oriented.
2. The C language has a standard function library, which is loose, but stores functions with the same functions in a header file; c ++ is closely integrated with most functions. In particular, the APIs in C ++ that are not available in C are an organic combination of most APIs in the window system and a collective. However, you may also call the API separately.
3. In particular, the graphic processing in C ++ is very different from the graphic language. Graph processing functions in C language cannot be used in C ++. The C language standard does not include graphic processing.
4. Both C and C ++ have the concept of structure, but in C, the structure only has member variables, rather than Member methods. In C ++, it can have its own member variables and member functions. However, in the C language, the structure members are public and can be accessed by anyone who wants to access them. In VC ++, the structure members do not have a qualifier that is private.
4. C can write many programs, but C ++ can write more and better. c ++ can write programs based on dosr, DLL, and control, write System.
5. The C language organizes program files in a loose way and requires almost all program processing. c ++ organizes files in a project and each file is clearly classified.
6. The IDE in C ++ is very intelligent. Like VB, some functions may be better than VB.
7. c ++ can automatically generate the program structure you want, saving you a lot of time. There are many available tools, such as when you add a class to MFC and when you add a variable.
8. There are many additional tools in C ++. You can perform system analysis, view APIs, and view controls.
9. Powerful debugging functions and diverse methods

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.