From C # to C + + 's mental Journey

Source: Internet
Author: User

Go from C # to C + +

Always see the "C + + programming thought" that "thinking in C + +", my English is not good, so bought a Chinese version of, but a lot of statements are not through, ah, all blame their own school without learning English well ... It seems that the translation of Chinese technical books is still lacking!

Look at the code to see three strange phenomenon: 1. The use of TypeDef is particularly numerous, for example: __t abbreviated to _t, and typedef hinstance HMODULE; This is not shorthand only for the change of a name, this has no purpose and complicated shorthand really let me Zhang two monk

2.c++ template is a major feature, the optical system library has a lot of template applications, and this template layer, often see embedded 4, 5 layers of a class, from the name of the class can not see what the class is a structure, how the internal implementation, but also do not understand how to use the class. The book also gives examples of nested templates, but mostly simple forms, and I don't know what to do with that, which is better than other implementations. So only not to go to the bottom, remember a presumably on the line. Think, if you write the code will certainly not write a template more than 1 layers.

Anyway, just write it down and keep looking.

From C # to C + + 's mental Journey

Related Article

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.