//----------------------------------------------------------------------
// This program illustrates the input of strings from the keyboard.
//
// Written by:  Brad Richards,  2/23/99
//
// Inputs:	Repeatedly reads strings from keyboard
// Outputs:	Prints out the strings read in
//----------------------------------------------------------------------

#include <iostream.h>		// for cout

typedef int Boolean;
const Boolean FALSE = 0;
const Boolean TRUE = 1;

int main()
{
    char line[80];		// Holds input string

	// Sit in an infinite loop reading strings and printing

	while (TRUE)
	{
	    cout << "Reading via cin:     ";
	    cin >> line;		// Read up to whitespace
	    cin.ignore(200,'\n');	// Now consume the \n
	    cout << "cin just read \"" << line << "\"" << endl;

	    cout << "Reading via cin.get: ";
	    cin.get(line, 80);		// Read up to \n
	    cout << "cin.get just read \"" << line << "\"" << endl;
	}

	return 0;
}

