home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_11_07
/
1107107a
< prev
next >
Wrap
Text File
|
1993-05-04
|
444b
|
23 lines
// incore.cpp: Incore formatting
#include <iostream.h>
#include <strstream.h>
#include <stddef.h>
main()
{
const size_t BUFSIZ = 128;
char s[BUFSIZ];
int i;
cout << "Please enter an integer: ";
cin >> i;
ostrstream(s,sizeof s) << "You entered " << i << ends;
cout << "s == \"" << s << "\"\n";
return 0;
}
// Sample Execution
// Please enter an integer: 10
// s == "You entered 10"