Introduction to C ++

Source: Internet
Author: User

The following describes how to learn C ++. The C ++ language is too flexible, it supports various programming styles such as process-based programming, data abstraction, object-oriented programming, and generic programming, such as creating icons.

First, we need to know what language C ++ is? To put it simply, C ++ is a language close to the omnipotent language. Why is it close? C ++ has a language that cannot be replaced, that is, assembly. To put it bluntly, C ++ cannot perform register operations in assembly. Believe it? How can I rewrite the PC register with C ++? No, right?

"Close to" can be understood, so what about "all-powerful? We know that C ++ is compatible with C. Not strictly speaking, we can simply think that C is only a subset of C ++, So C ++ can do what C can, and no one has any objection to this. For convenience, the C ++ described below also represents C in some aspects. The reason why C/C ++ is not used is just to protect the keyboard. Back to the question, what about C? What about JAVA? What they can do, such as network applications and all aspects of B/S, has not seen C ++?

Well, from another perspective, what is the running basis of C # and JAVA? Yes, it's a virtual machine. What are virtual machines used? Hey, C ++. Therefore, you can use C ++ to write a virtual machine first, and then explain the C ++ syntax on the virtual machine. Is it cool?

Of course, I don't think anyone will do that in reality. Just like from Shenzhen to Shanghai, you can fly or ride a bicycle. Both can reach the destination, but I guess few will choose the latter. This is the efficiency issue. When I got on the plane, my eyes closed and I got there. I rode a bicycle? Well, it's hard to estimate the time. So in this field, let C # or JAVA be involved. As for C ++, let it be done by the side, unless you must want to play cool.

Next, let's look at the desktop application. Desktop applications are desktop applications in a narrow sense. In general, C ++ still has a place in this field. However, the only place is at stake. Before XP, because the system was not pre-installed with. net framework, C ++'s opponent was simply VB and DELPHI, but the two could not shake the big tree of C ++. Although XP can also install the. net framework, it is a little unrealistic to get such a huge volume for an application.

  • Explore the secrets in C ++
  • How to better learn C ++
  • Introduction to C ++ Design
  • What does C ++ bring to us?
  • Basic Conception and method of C ++ Class Library Design

But in the later XP era, the world will be different. Vista has pre-installed. net framework, not to mention Windows 7. There are even rumors that the Windows 7 user interface is implemented using C. Besides, C # is also a killer and can be perfectly integrated with Silverlight, greatly reducing the difficulty of UI development. It seems that in the future, it will be in this desktop application field.

C ++ has never been comfortable. In this field, C ++ may be even better, and there may be a large 3D game. Although using. net with OpenGL or Direct3D can also do C ++, the efficiency will be greatly reduced. Although this discount may be reduced as the hardware continues to increase, it still exists. As long as discounts exist, those game manufacturers will not give up C ++, because they can be optimized, why not? However, this may be the only limit. C ++, it burst into tears.

Finally, it is the embedded field. Here, it is the world of C ++, and C ++ is the eternal King. It's not a battle! At this moment, its soul is embodied! You have seen the restatements written in languages other than C ++. As mentioned above, C ++ here also represents C )?

At least I'm not impressed. Does embedded linux support. net? Unless Microsoft's head is pretty funny. Some people may say that WinCE does not support. net? Yes, but not all WinCE devices. Because WinCE is a cropping operating system, it may be to save memory space, it may be to speed up the startup, or for other miscellaneous or even inexplicable reasons, many vendors will not. net, which will add components with a system expansion of at least 4 MB to the product.

Look at the kernel code of WinCE and see where the. net code is found in the BSP package of WinCE? All Clear C ++. Microsoft has a very clear attitude even for WinCE applications. on the desktop, it can only use Silverlight. net. After WinCE SP3 is added, it is changed to a C ++ interface. The king, the absolute king, cannot have other languages here to shake C ++! Now C ++ stands up! Waist straight!

After talking so much, let's finally look at why everyone says it's hard to learn C ++ well. If you are not interested in learning C ++ well, you may not be able to take any of the following texts into consideration. In this case, you can happily or angrily drop the current webpage.

In fact, it is very easy to learn C ++, but it is difficult to find the word "good. Beginners will find it easy to get started, because C ++ has no syntax. But after figuring out the syntax, I am confused. What should I do next? This is because C ++ is too flexible. For a function, C ++ has various methods. which method is the most suitable?

For example, when should a pointer be used and a reference be used for a form parameter passed to a function? Even we can't do the normal pointer transformation anymore. We have the brackets in the form of C and the dynamic_cast and reinterpret_cast unique to C ++. Which one should we use? Not to mention memory allocation, including malloc and new. If STL is used, there is also a resize. I think all of this, for beginners, if he looks at these, his legs do not hurt, then I strongly admire this person's calm.

Even if you don't need STL, classes, virtual inheritance, or even all the features of C ++, C ++ also makes beginners even more depressing. So I wonder, what is C ++? Maybe at this time, many people will think, if the choice is unique, how happy it is! Therefore, many people turn to C # or another language), because for some operations, the method is unique; even if it is not unique, it is not as numerous as C ++.

I am not going to discuss how to learn C ++ here, because one thousand people have one thousand methods, and these one thousand methods are not necessarily suitable for you. But one thing is common: read more books. By carefully digesting the Classic C ++ books on the market, I believe it will surely be a great success. Even if it cannot be reached, it will be okay. Will it be fine if it doesn't make poetry? However, at this time, willpower is very important. Of course, it also requires a little bit of emotional intelligence, to believe that there is no hurdle.

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.