CS 46A Lab 5
Getting Help

Department of Mathematics and Computer Science
San Jose State University

InfoViewer

InfoViewer (IV) is a web browser and search engine built into MSDS, together with a hierarchical database of documents variously called InfoViewer Titles, InfoViewer Topics, or IVTs for short.

IVTs are displayed in child windows of the MSDS main window, just like source, header, and text files. Unfortunately, only one IVT can be displayed at a time.

Although IV will display ordinary web pages (.html files,) IVTs are contained in .ivt files, which can't be displayed using the Netscape or Internet Explorer browsers. (Typical of Microsoft, right?) Like web pages, IVTs can contain links to other IVTs and to web pages.

IV provides three ways to locate IVTs: the table of contents tree control, the search engine, and the F1 key (a.k.a. context-sensitive help).

Table of Contents

The IV table of contents is a tree control (similar to Windows Explorer) displayed in the Workspace window:

The IV database is organized into topics (IVTs) and volumes. A volume is a collection of sub volumes and topics. A volume usually appears in the tree control as a book(s) icon with a + or – sign next to it. Click on the + sign to expand a contracted volume (i.e., see its contents). Click on the – sign to contract an expanded volume.

The IV database contains a huge number of topics and volumes. Fortunately, we will only be interested in the Visual C++ volume located under the Developer Products volume. In particular, VC++ Programmer's Guide, C/C++ Language and C++ Libraries, Developer Studio Environment User's Guide, Glossary, and Getting Help are the only sub volumes that contain information of interest to us. (The tutorials, samples, and references contain information about using the Microsoft Foundation Class (MFC) framework, which is used to build Windows applications.)

Below is a quick summary of these volumes. I have placed a (highly subjective) usefulness-for-novice-programmers rating next to each volume (0 = useless, 10 = indispensable).

Independent of a volume's usefulness is its readability. Most IVTs are encountered through the search engine or the F1 key. Only a few are intended to be read from beginning to end, like a book. Accordingly, I have also assigned a (highly subjective) readability rating (0 = avert your eyes, 10 = good bedtime reading) to each volume.

VC++ Programmer's Guide

Compiling and Linking (usefulness = 6, readability = 9)

If you need to change compiler or linker settings-- for example, to optimize your executable-- this volume contains information about the available settings. It also contains interesting, general information about the build process.

Debugging (usefulness = 7, readability = 9)

If you still have questions about how to debug programs after reading the chapter in the lab manual about debugging, then look here.

Language Quick Reference (usefulness = 1, readability = 2)

This dull volume describes the C++ keywords, operators, and data types.

Runtime Library Reference (usefulness = 3, readability = 1)

The runtime library provides useful functions for accessing platform services (e.g., the Windows operating system and the underlying hardware). Most of these functions are either too platform specific to be of interest to novice programmers, or have counterparts in the standard C++ library, which should be used instead.

This volume also contains documentation for the standard C library. Remember, C++ extends C, and MSDS can be used to develop C programs, too.

Build Errors (usefulness = 8, readability = 0)

Compiler and linker error messages that appear in the output window are accompanied by a code number: Cxxxx for most compiler errors, LNKxxxx for linker errors. There are other types of errors, too. Click on the code number with the left mouse button, then press the F1 key to jump to the page in this volume that describes the nature of the error. This trick is especially useful for linker errors, because the linker doesn't provide as much error detection help as the compiler does.

C/C++ Language and C++ Libraries

C++ Language Reference (usefulness = 9, readability = 9)

This volume contains a complete description of the VC++ implementation of C++. Forget the syntax of the switch statement? Can't remember what multiple inheritance means? Need to know the ASCII code for 'a'? This is the place to look.

iostream Library Reference (usefulness = 1, readability = 1)

There are two iostream class libraries, the old and the new. The old library, documented here, follows the original de facto standard. The new library, described in the Standard C++ Library volume, is consistent with the new ANSI standard and should be used instead.

Standard C++ Library (usefulness = 10, readability = 1)

Don't reinvent the wheel! Use standard functions and classes whenever possible. Programmers are often surprised by what is actually contained in the standard library. This volume documents the entire library, which in itself is a useful service because most C++ books don't.

Developer Studio Environment User's Guide and
Getting Help (usefulness = 7, readability = 9)

The lab manual only covers the basic operation of the MSDS components (editor, debugger, IV, etc.). If you want more, read the Developer Studio Environment, Text Editor, and Debugger sub volumes of the Developer Studio Environment User's Guide, or read the Getting Help volume.

Glossary (usefulness = 2, readability = 0)

This is just a list of definitions of the most of the terms used in IV. It's too incomplete to be really useful.

Context Sensitive Help (F1)

Can't remember if the sin() function expects radian or degree arguments? Click the call to sin() with the left mouse button, then press the F1 key. Either the IVT for the sin function pops up, or a query result page showing the entries for the sin() function pops up.

The IV Toolbar

The IV toolbar contains navigation controls found on the toolbars of most web browsers: goto/add a bookmark, goto home page, go back (light blue left arrow), go forward (light blue right arrow), goto a URL, refresh view, and stop retrieving.

In addition, the toolbar contains dark blue up and down arrows for going to the previous and next topic in the IV database, and a useful synchronization button on the far left end of the toolbar that shows where the IVT currently being displayed is located on the tree control.

Search

The search engine (click the binoculars icon on the IV toolbar) displays the Search dialog box that allows users to search the index or contents of the IV database.

Searching the Index

Searching the IV index is the most common way to find information. Click the Index tab of the Search dialog to start. The dialog consists of a keyword entry control, a keywords list box, a topics list box, and two buttons.

Begin typing your search string in the entry control. The search engine incrementally searches the index (i.e., it searches as you type). The segment of the index containing your search string (if it was found) is displayed in the keywords list box. Use the mouse to select a keyword in the keyword list box, then press the "List Topics" button to display the IVTs related to your search string in the topics list box. Select the IVT you're interested in by clicking on it, then press the Display button.

Be careful, don't press the Display button until you have selected a topic in the topics list box.

Searching the Contents

Click the Query tab of the Search dialog box to find all occurrences of a string in the IV database. Type the string into the find control, then press the Query button. The result of the search is displayed in a tabbed result list child window:

Double click on any entry listed in the result list window to see the corresponding IVT.

Defining and Selecting Subsets

Select "Define Subsets" from the Help menu to name and define subsets of the database.

To restrict the tree control, search engine, or context-sensitive help to a defined or predefined subset, select "Select Subsets" from the Help menu.

Restricting searches to VC++ documentation is a good idea because sometimes searches for VC++ library functions turn up Java functions from Visual Java, which, at first glance, look like C++ functions. Of course calling a Java function from a C++ program produces lots of confusing error messages.