【正文】
ne another to build the final product your program. For now, just think of the project file as the brain of your project: it keeps track of everything that is going on and knows how to bine files and settings into a working application program. The Project window in turn displays this information about your program and its files and allows you to modify the project by just pointing and clicking. Most of the files that make up your program are ordinary text files. These files contain your source code. You39。ve been using as an example, this output file is an application. In some cases, functions used in a program may not even be stored in the same output file. When would this happen? When you write an application, for example, that contains a lot of code that is reused in several parts of your program, you might pile all of that reusable code into a single shared DLL. When you do this, the application can still access the code, but it needs to know where and how to find it when it needs it, hence the need for linking. An Introduction to Debugging Debugging is the process of tracking down a problem in your code and fixing it. The sad truth is there is always the possibility that your code contains typing or logic errors. Maybe you thought through a problem thoroughly but still missed a key step in solving it, or maybe you made a tiny typo in your code or used the wrong variable. In many cases, you39。 then rebuild your target. Once that39。s a library? This is a question you need to know the answer to! A library is a file that contains piled code that your programs can call upon when needed. Typical functions that libraries can offer are file and screen I/O, memory management services, 3D graphics display, and scientific putations. Libraries can save you time in the development process and help simplify your software applications. Chances are that you will use libraries quite often in developing programs. There are several ways to use library code in your programs: Your Own Library or DLL The first method is simple. When you include code within a C or C++ source file, you plete the program by simply piling, linking, and executing it. This is the way we39。s Library Using someone else39。s much safer to include the library and a header file (as opposed to a C or C++ source file and a header file), especially if you want to protect your intellectual property. The problem with this approach is that if there39。ll have to obtain a fix for the library from that vendor, and who knows how easy that will be? A DLL is very similar to a library file. In fact, the only difference is that a library file usually gets piled and linked into your application, while a DLL is a separate file that either sits in your system directory or in the same directory as your piled application. When your application runs, it locates the DLL and uses its services on the fly. DLLs are typically identified by the .dll benefit of a DLL is that it can be shared. OK, that was pretty obvious. What is the benefit of sharing? First, more than one application can make use of a DLL. This can be especially useful when several programs use a large DLL that takes up lots of disk space and/or memory. Also, if a DLL contains a bug and is updated, all programs that share it will be automatically updated. This saves you and your runtime processing large amounts of time. So what kind of library would need to be shared by multiple applications? Oh, stuff like the very windows you see in your operating system environment. What is MFC? The Microsoft Foundation Classes (MFC) provides a set of functions that let you quickly write Windows applications. While y