--> Paul C wrote to All <--
PC>I recently purchased Visual C++ 1.0 (Windows). I was
PC>wondering how to enter, say, a sentence, and have the
PC>program recall the sentence.
Paul, in a DOS shell, you can use the cin and cout streams for input and
output.
#include "iostream.h"
int main(void)
{
char str[128];
cout << "Enter sentence: ";
cin.get(str, sizeof(str));
cout << "The sentence was: " << str;
return 0;
}
X CMPQwk 1.42 1692 X"A good horse should be seldom spurred." - Thomas Fu
--- Maximus/2 3.01
---------------
* Origin: COMM Port OS/2 juge.com 204.89.247.1 (281) 980-9671 (1:106/2000)
|