11.07.2015 Views

tYSR20

tYSR20

tYSR20

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

388Part VI: The Part of TensCreate a Project FileYou can generate a program from a single .cpp file without using a projectfile. This is fine for small programs. However, you should break larger programsinto smaller modules that can be understood more easily. Buildingmultiple .cpp modules into a single program requires a Project file. I describethis in Chapter 22.Customize the Help MenuDev-C++’s help default topics are limited to the compiler, and don’t includethe C++ language or any of its libraries. Fortunately, Dev-C++ allows you customizethe Help options. You can add files in Microsoft Help (.hlp) andCompiled HTML (.chm) formats to Help. (Note: You’ll have to find extra .hlpand .chm files. You can find these on the Web if you look hard enough.Neither Dev-C++ nor www.bloodshed.net provide an extra Help file.)As an example, I downloaded the freely available Help file Win32.hlp. This filelists the Windows operating system Application Program Interface (API) calls.Choose Help➪Customize Help Menu to access the Help Menu Editor.Click the Add button along the top of the window. Dev-C++ opens a browsewindow. Navigate to the help file that you want to add. Select the file andclick OK. Finally, check the appropriate boxes at the bottom of the window.Here I included the Win32.hlp file in the Help search. Click OK. The contentsof the new help file are now available from the Help menu.You can add as many help files as you like.Reset Breakpoints after Editing the FileDev-C++ sets breakpoints based on line number. Unfortunately, it does notmove the breakpoint when a line is inserted or removed from the source file.For example, suppose that I set a breakpoint on line 10 within my program. IfI then add a comment between lines 9 and 10, the breakpoint now points tothe comment. Obviously, comments are not executed, so the breakpointbecomes meaningless.Remember to recheck your breakpoints to be sure they still make sense afteryou edit the .cpp source file.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!