Category : Alternate Operating Systems - Quarterdeck DesqView, CP/M, etc
Archive   : PCCAPP.ZIP
Filename : SAMPLE1.CC

 
Output of file : SAMPLE1.CC contained in archive : PCCAPP.ZIP
// sample1.cc: Echo keyboard input. Stops when '#' is typed.
#include "OutputStream.h"
#include "InputStream.h"

int main (int, char **)
{
// This program repeatedly reads keypresses and prints them until you
// press '#'. To read a single keypress, we call the read() method on
// the StandardInput, the arguments being an array to hold the character
// typed (array c), and the number 1, to indicate that we want to read only
// one character from the keyboard. read() will return the number of
// characters read. StandardInput (of type InputStream) and StandardOutput
// (of type OutputStream) are special global variables used for reading
// characters from the keyboard and for writing characters to the screen.
*StandardOutput << "Type a sequence of keys ending with #\n" << eor;
char c [1];
int charsRead = StandardInput -> read (c, 1);
while ((c [0] != '#') && (charsRead > 0))
{
StandardOutput -> write (c, 1);
*StandardOutput << eor;
charsRead = StandardInput -> read (c, 1);
}
return 0;
}


  3 Responses to “Category : Alternate Operating Systems - Quarterdeck DesqView, CP/M, etc
Archive   : PCCAPP.ZIP
Filename : SAMPLE1.CC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/