If the file isn't big and you don't care if it's completely loaded in
memory, use the ostringstream, and then use a istringstream, using
ostringstream's rdbuf. Otherwise you can use ofstream, and then reread
this file. An other solution is to use a custom writecallback (there's
example of this), and then process your self the end of line
processing.


On Tue, Jun 22, 2010 at 8:17 PM, Aaron Quinlan <[email protected]> wrote:
> Hello,
>
>   I've scoured the web and looked through the examples on the curlpp
> website, but I cannot find a useful example of how to treat a remote
> file as an istream for structured processing.  Essentially, I'd like
> to:
>
> 1) Open a remote file (preferably as an istream)
> 2) Loop through it line by line (while(getline()) {} )
> - do some magic
> 3) Close the connection
>
> The examples I have seen connect a file to ostringstreams, etc.  Does
> anyone have a salient example that can do the above?  I would be very
> grateful.
>
> Best,
> Aaron
>
> --
> You received this message because you are subscribed to the Google Groups 
> "curlpp" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/curlpp?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"curlpp" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/curlpp?hl=en.

Reply via email to