C Language Beginner's puzzle-How to change from DOS to Windows

Source: Internet
Author: User
Tags win32 windows insider

Many people learn C language for a long time, I do not know what C can do, think that learning C language is not used, is purely to cope with the school exam. More people say, "Learn C language?" Don't do such a stupid act! Learn C + +! This view is wrong, should not be the C and C + + between the absolute demarcation line, too much emphasis on C + + and the C derogatory to a useless, this is very one-sided. Although the C + + function is powerful, but it is a "superset" of C, in C + + where can not find the shadow of C? C is not supported, C + + can only be non-existent.

In general, C + + programming is written in a small amount of program source code, but after compiling the amount of code is large, the speed is slightly low, but the development of the workload and work is less difficult, and C programming the source code is large, but the efficiency is high. If some of the requirements for speed are high, especially for hardware operations, Most are developed in C programming (c is simpler than assembly, easy to implement). In addition, learning Win32 C programming also helps to get a deeper understanding of Windows Insider and Win32 APIs.

Any programming language is a tool, the purpose of learning a language is to use it to write the actual needs of the software, and software as a user program, the runtime depends on the operating system, most people use what operating system, we need to write a platform based on which program to. In this way, the software will have a larger market.

Now on the market on the C language books are mostly Professor dos under the C, on-machine internship is also in the Turbo C 2.0 (TC) around the environment. The monotony of the programming environment always makes people feel bad. There is no way, DOS C is the simplest, Beginners, of course, from the easiest to get started. Even the more famous computer expert Tan Haoqiang's book is also in favor of the DOS from the C to learn. Besides, a beginner who wants to use C programming in a multi-process, multi-threaded operating system like windows, that doesn't seem realistic. (That's to understand how a Win32 program works in general in Windows.) to have a more understanding of the system, a beginner does not have so much knowledge, but our footsteps can not only stay in the DOS, You should actively shift from DOS to Windows. In the era of DOS, we can be addicted to the programming of DOS, but now it is Windows Bully era, we have to use the C language to write programs on the Windows platform, because sometimes change, to apply. It's The Times! If now or DOS male bully the world, then I will not write this article Dog to leave the smile generous, not to be rotten eggs to die to blame it!

"Political reform" is the general trend, the key is how to change, not only to learn C language people so, even learn C + + people are like this, the author once encountered in QQ to learn C + + nearly a year of the boy, incredibly asked me, he wanted to make up a Windows window, how to do it, if learning a language took a year, Just learned a little grammar knowledge, but did not make up a procedure, that is a kind of sadness. Let me talk about some personal insights from DOS to Windows (this is purely personal, for reference, and if you're already a master, you don't have to waste any time here):

I. Broaden our horizons and change our prejudices.

Do not always think that C is only a DOS-specific thing, a reference to C language is believed that C can only be programmed in DOS. In fact, this is the TC bound the consciousness, we in the school usually only in the DOS TC inside with C programming, rarely used to "graphic mode", face all day? quot black "screen, It is no wonder that some people see a C language as depicted in the Windows window is thought to be C + + handwriting. In fact, as a language, can be programmed on any platform, but the interface is different, as long as the platform to find the appropriate programming tools, C language, of course, can also shine under Windows. Broaden your horizons, change your prejudices, and you will find something wonderful.

Two. Choose a good programming tool.

"With good tools, doing things will do more with less." In DOS we commonly use TC or BC (Borland C). You can use C++builder or Visual C + + to program in Windows, preferably with Visual C + +, after all, Microsoft's stuff! Microsoft never collapses, Programmers will not lose their jobs ^_^. Besides, the Windows operating system is Microsoft, its inside Microsoft is the most clearly, in the application interface, I believe VC is also doing the best. But using VC + + to edit C program will be annoying, You have to be prepared. At the same time, you can choose a variety of programming tools, such as assembly, you can enhance the understanding of Windows, is a good way to become a master.

Three. Strengthen the understanding of Windows.

It can be said that the process of compiling a program is to describe the data structure and the execution of the surface in a grammatical form of a language. Under different operating systems, the process of executing a program is different. We should have at least a general understanding of the system mechanism of windows, It is possible to write a program for Windows. DOS is a single process single-threaded system in which the process executes from start to finish, while Windows is a multithreaded, multi-threaded operating system that is event-based, Message-driven operating system. Understand that these are essential for programming in Windows, and learn more about it, and you will find many differences between windows and DOS.

Four. Adopt flexible learning methods.

Learning different things at different times? But some people learn like word,excel this kind of highly operational Office software, always read first, see the tail forgot the head, to the machine but at a loss. This kind of learning is passive, look at the software operation of the book, which said is the specific operation, How can you accept new knowledge without your own hands?

Five. More comparisons.

DOS and windows have a lot of common and different places, if it is from the DOS learned, in the learning process may wish to compare, the different place down, the same place can be skipped, this can quickly understand the difference between the system, quickly learn to things!

Learning programming, I advocate "Practice-> theory-> Practice" way, at the beginning of programming, whether you will not write the program, should first practice, (here is the practice refers to the practice of programming tools), learn to operate programming tools. Maybe some people will say: "Nonsense!" without theory, how to practice? " Yes, when you sit in front of a computer at a loss, you will find ways to make their own learning to operate it, active reading, watching online help, consult others, busy a "happy", this is not to become "passive" as "active" it? While learning to operate, to practice to drive the theory of learning, and then achieve "theory and Practice Synchronization", you can go through the first pass, learned the basic programming tools, can be for later on machine practice lay the groundwork.

Light learned to operate such as VC tools are not good, the tool is dead, the talent is alive, not programming can only be empty operation, you will also say: "Nonsense!" no theory, how to practice? , it's time to learn the real skill of programming, that is, I said the second stage-learning "theory" stage, in-depth study of predecessors of the works, absorbing the wisdom of the predecessors for my use, solid play good programming skills, Kung Fu home should be "again practice", will learn the things used in practice, Write out the software that we need to learn, hehe ~ ~ This way is always better than the "first good grammar rules, then on the machine practice" the effect is much better.

The personal point of view on turning to Windows is only to talk about this, I hope beginners early on the bright Road of Windows! Because I am also a rookie, the level is limited, writes badly, also invites everybody to forgive!

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.