I need to write an STL string to a file. I have a list of things (ASCII data) that I need to write to a file line by line. The line is like:
"mike", "baranski", "400", "The man"
and ends with a newline (the newline is included in the STL string).
I need help opeining a filehandle and printing these lines to it. I alreday have the loop set up to generate the data and set up the string, I just need help with the filehandle end and what to write to it.
An stl string can be turned into a c-string by calling stlStringName.c_str(); If you know of a way to write a c null terminated string to a file that's great, too.
Thanks!! As always, I hope that helped!
Disclaimer:
Beware: Studies have shown that research causes cancer in lab rats.
"mike", "baranski", "400", "The man"
and ends with a newline (the newline is included in the STL string).
I need help opeining a filehandle and printing these lines to it. I alreday have the loop set up to generate the data and set up the string, I just need help with the filehandle end and what to write to it.
An stl string can be turned into a c-string by calling stlStringName.c_str(); If you know of a way to write a c null terminated string to a file that's great, too.
Thanks!! As always, I hope that helped!
Disclaimer:
Beware: Studies have shown that research causes cancer in lab rats.