Chapter 1 transition from C to C ++

Source: Internet
Author: User
Chapter 1 transition from C to C ++

It takes some time for everyone to get used to C ++. This process is especially distressing for programmers who are familiar with C. Because C is a subset of C ++, all C technologies can continue to be used, but many of them are not suitable for use. For example, C ++ Programmers think that pointers look odd. They will ask: Why don't we use pointer references instead?
C is a simple language. Only macros, pointers, structures, arrays, and functions are actually provided. Regardless of the problem, C relies on macros, pointers, structures, arrays, and functions. C ++ is not like this. Macros, pointers, structures, arrays, and functions certainly exist, in addition, there are private and protected members, function overloading, default parameters, constructor and destructor, custom operators, inline functions, references, friends, templates, exceptions, namespaces, and so on. C ++ has a wider space than C, because there are more choices to consider during design.
In the face of so many choices, many c programmers stick to their old habits. In general, this is not a great sin. However, some C habits are contrary to the spirit of C ++. They are all elaborated in the following terms.

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: 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.