C Language Learning: How to change from dos to windows
Source: Internet
Author: User
C Language Learning: How to change from dos to windows-Linux general technology-Linux programming and kernel information. The following is a detailed description. Many people have been studying C language for a long time. I still don't know what C can do. I think it is useless to study C language. It is purely for the purpose of dealing with exams in schools? Don't be so stupid! Learn C ++ now! "This is wrong. We should not draw an absolute boundary between c and c ++. It is one-sided to put c ++ too much emphasis on it. although C ++ is powerful, it is a "superset" of c after all. Which of the following cannot find c shadows in c ++? Without the support of c, c ++ can only be the root of the tree.
Generally, the source code of a program written in c ++ is small, but the compiled code is large and the running speed is slightly lower, however, the development workload and work difficulty are relatively small, while the c programming method has a large amount of source code, but the execution efficiency is high. if some programs require high speed, especially those with more hardware operations, most of them are developed in c programming mode (C is easier to implement than assembly ). in addition, learning Win32 C programming also helps you gain a deeper understanding of Windows and Win32 APIs.
Any programming language is a tool. The purpose of the learning language is to use it to compile the software that is actually needed. As a user program, the software depends on the operating system to run, for most people to use what operating system, we need to compile the program based on which platform. in this way, software will have a larger market.
Most of the books on c language on the market are Professor C under DOS, and the computer practice is also transferred in the Turbo c 2.0 (Tc) environment. the monotonicity of the programming environment is always unpleasant. there is no way to do this. The c in dos is the simplest. Of course, beginners need to get started with the simplest one. even the books compiled by Tan haoqiqiang, a famous computer expert, are in favor of c under dos. besides, it seems unrealistic for a beginner to use c programming in a multi-process, multi-threaded operating system like windows. (You Need To Know How A win32 program is executed in windows. we need to have a better understanding of the system. A beginner does not have that much knowledge at the moment.) But we cannot just stay in dos, we should actively switch from dos to windows. in the era of dos, we can be infatuated with programming under dos, but now we are all in the era of windows, where we use C language to write programs on windows platforms, apply what you have learned. this is the result of the times! If it is still dos, I will not write this article to make a smile. It is strange not to be thrown to death by rotten eggs!
"Transformation" is the trend of the times. The key is how to change it, not just for people who study c language, but even those who study c ++, I once met a guy who has been learning c ++ for nearly a year on QQ and asked me how to compile a windows window, if it takes a year to learn a language, but I have learned a little grammar knowledge, but I have not compiled a program, it is really sad. next I will talk about some personal opinions on the transition from dos to windows (this is purely a personal opinion for your reference only. If you are already a master, you do not need to waste time here ):
I. broaden your horizons and change your prejudice
Do not always think that c is only a unique feature of dos. When it comes to c, c can only be programmed under dos. in fact, this is the consciousness bound by tc. In school, we only use c Programming in dos tc, and seldom use "graphic mode". What do we face all day? Quot; black and black "screen, it is no wonder that some people think it is c ++'s handwriting when they see a windows window depicted in c language. in fact, as a language, you can program on any platform, but the interface is different. As long as you find a programming tool suitable for the platform, the C language can of course shine in windows. broaden your horizons and change your prejudice.
2. Select an excellent programming tool.
"If you have good tools, you can get twice the result with half the effort ". in dos, we usually use tc or bc (borland c ). in windows, you can use c ++ builder or visual c ++ for programming. It is best to use visual c ++. After all, it is Microsoft! Microsoft will not collapse in a day, so programmers will not lose their jobs. besides, the windows operating system is developed by Microsoft, and the inside story of Microsoft is the clearest. In terms of application interface, I believe vc is also the best. however, using vc ++ 6 to compile c programs will be annoying and everyone should be prepared. at the same time, you can choose a variety of programming tools, such as assembly, to enhance understanding of windows, is a good way to become a master.
3. Enhance understanding of windows.
To compile a program, you can use the syntax of a language to describe the data structure and the execution process on the surface. in different operating systems, the program execution process is different. we should have at least a general understanding of the windows system mechanism to write windows programs. dos is a single-process, single-thread system, where processes are executed sequentially from start to end. windows is a multi-process, multi-thread operating system, and is an event-based, message-driven operating system. knowing that these are essential for programming in windows, you will find many differences between windows and dos.
4. adopt flexible learning methods.
How can I learn different things in different periods? However, when some people learn office software such as word and excel, they always read books first and forget their heads when they get to the computer. this kind of learning method is passive. reading these software operations books describes specific operations. How can I accept new knowledge without my hands?
5. Compare multiple items.
Dos and windows have many similarities and differences. If you have learned from dos, you may wish to compare them during the learning process and write down the differences. You can skip them in the same place, this allows you to quickly understand the differences between systems and learn things quickly!
Learning Program Design, I advocate the "Practice-> theory-> practice" approach. In the early stage of programming, no matter whether you write a program or not, you should first practice it, (The practice here refers to the practice of programming tool operations), learn to operate programming tools. some may say, "nonsense! How can we practice it without theory? "Good, when you are sitting in front of a computer, you will find ways to learn how to operate it, take the initiative to read books, read online help, ask others, busy" happy ", didn't this change from "passive" to "active? Learning and operating while driving the study of theory with practice, and then achieving "synchronization of theory and practice", you can go through the first level and learn the basic operations of programming tools, it can lay a foundation for future machine practice.
Optics will operate tools like vc, but they will not work. The tools are dead and the talents are active. They will not be programmed and can only be empty. You will also say, "nonsense! No theory, how to practice? "At this moment, we need to learn the real effort of programming, that is, the second stage I am talking about-learning the" theory "stage. I will thoroughly study the works of my predecessors and use the wisdom of my predecessors for my purposes, if you work hard on programming, you should "practice" and use what you have learned to compile the software we need. what can I do ~~ This method is better than "Learning grammar first and then practicing it on the computer.
My personal opinions on the transition to windows will only talk about this. I hope that beginners will soon embark on the bright road of windows! I am also a cainiao, with limited levels and poor writing skills. Please forgive me!
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.