Ian Collins <ia******@hotmail.comwrites:
Gary Wessle wrote:
Hi
is this done correctly? if not, how can it be done please?
put what ever data in a stringstream then put that in a string
and deal with it as a string.
thaks
stringstream oss; string f;
oss << vec[8] << " "
<< var1 << " this is nice " << var_n << " " << endl;
oss >f;
f will contain the first word output to oss. Try oss.str().
--
Ian Collins.
oss.str() >f;
error: no match for ¡Æoperator>>¡Ç in
¡Æstd::basic_stringstream<_CharT,
_Traits, _Alloc>::str() const [with _CharT = char, _Traits =
std::char_traits<char>, _Alloc = std::allocator<char>]() >f¡Ç