Boost logo

Boost Users :

Subject: Re: [Boost-users] multichar_input_filter, what I'm doing wrong?
From: Anand Patel (anand.apatel_at_[hidden])
Date: 2010-02-18 11:47:31


I am not an expert on this topic but have had experienced similar problem as
I was learning how to user filters.
First, make sure your code does not violate any contract that is documented
in iostream library.

Quickly looking at your code, you don't seem to respect number of characters
supposed to be read in the buffer. You can consume as many character as you
want but final buffer must not exceed std::streamsize n.

Let me know how it goes.
-Anand

On Tue, Feb 16, 2010 at 11:38 AM, eial_at_[hidden] <eial_at_[hidden]>wrote:

>
> I'm implementing a base64 decoder using multichar_input_filter, it works
> well but it doesn't seems to stop, after the last char of the testcase
> string (which is reads from file), it continues to read, I must be missing
> something, here is the code: http://codepad.org/YvKREpKS the convert
> funcion does the actual convert and I don't think it is relevant to the code
> but if someone thinks it is, I'll include it.
>
> I'm banging my head against the wall for a couple of days in this issue...
>
> thanks.
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net