TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: PAUL C PURGETT
from: CLIFF RHODES
date: 1997-04-13 16:07:00
subject: Inputting Info

--> 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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.