/* line.cc -- It reads lines from input and echoes them back. We also collect the line.
 */

#include <iostream>
#include <string>

void main(void) {
  char c;

  for(;;){
    string line;
    int count = 0;
    cout << "Please enter a line [blank line to terminate]> ";
    for(;;){
      cin.get(c);
      cout.put(c);
      if (c == '\n') break;
      line += c;
      count++;
    }
    cout << endl << "The line was \"" << line << "\"" << endl;
    if(count == 0) break;
  }
}

