#include <iostream.h>
#include <strstrea.h>

int main(void)
{
	char buffer[256];               // output buffer
	char text[] = "5 3 2 3.14";     // input text

	int i, j, k;
	float pi;
	istrstream istr(text);          // input stream, reads text
	ostrstream ostr(buffer, 256);   // output stream, writes to buffer

	istr >> i >> j >> k >> pi;
	ostr << "The numbers were " << i << "," << j << "," << k << endl;
	ostr << "Pi is " << pi << '\0';  // don’t forget the NULL!
	cout << buffer << endl;
	return 0;
}
