Code: Select all
for(it=li.begin(); it!=li.end(); it++)
{
wf->write((&it),sizeof(&it));
}
Thanks in advance.
Code: Select all
for(it=li.begin(); it!=li.end(); it++)
{
wf->write((&it),sizeof(&it));
}
Code: Select all
wf->write( (*it).c_str(), (*it).size() );
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
Oh, thanks about that one. Gonna see if it succeeds to write the entire list when I am back home.Sylence wrote:&it is a reference to the iterator. You can't write this into a file.
You want the string the iterator refers to:Code: Select all
wf->write( (*it).c_str(), (*it).size() );