/*Orion Lawlor's Simple STL Examples, olawlor@acm.org
Shows how to use std::istringstream.
*/
#include <iostream>
#include <sstream> /* for istringstream */
#include <string>

int main()
{
	int a,b,c;
	std::string str("14,12 17foo bar");
	char k;
	std::string f,g;
	
	std::istringstream stream(str);
	stream>>a>>k>>b>>c>>f>>g;
	
	std::cout<<a<<" "<<k<<" "<<b<<" "<<c<<" '"<<f<<"' '"<<g<<"'"<<std::endl;
	
	return 0;
}
/*<@>
<@> ******** Program output: ********
<@> 14 , 12 17 'foo' 'bar'
<@> */
