|
Introduction:Visual C++ 6.0 has a documented bug in its getline() routine, which is defined in the "STRING" include file. Microsoft has documented this bug and prescribed a fix, which can be read at
The "getline() Fixer" utility has been created to perform this fix for you, which involves modifying a system header file. |
|
The Problem:The bug causes getline() to work incorrectly when reading input from the keyboard. Specifically, the user is required to strike the Enter key multiple times instead of once after entering a line of input. Consider the following sample program that prompts the user for 5 lines of input, reads each line with getline()and echoes them to the screen. (The imaginative user has typed "This is line 0", "This is line 1", etc. at each prompt.) At the end, the program prints "That's all folks!" on a separate line. If getline()is working properly, the program produces the following output: When using the "buggy" version of getline()provided with Visual C++ 6.0, the same program produces the following output: To check whether you need to repair your version of getline(), try creating a Visual C++ project and running the on your own machine. If the program does not produce the desired output, you need to repair getline(). |
|
What this Utility Does:In order to fix the bug, the "getline() Fixer" utility does the following:
This utility has been tested and debugged. Before proceeding further, you should be aware of the following concerns:
|
|
What You Need to Do:
|
|
Disclaimer:This utility is provided only for students enrolled in CS 171-2 at Drexel University. No warranty against damage to your computing system is expressed or implied. |
JL
Popyack
Jan. 14, 2002