Link to home
Create AccountLog in
Avatar of thready
thready

asked on

Stuck - how do I read one character at a time from a boost input chain stream?

The question title says it all.... I thought you could try the following but it doesn't work:

char ch;
ch << in;

Someone else suggested an API call, but I can't find it!  Something like in.read(ch, 1)

Thanks for your help!
Mike
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Do you mean this?

http://www.boost.org/libs/iostreams/doc/classes/chain.html

chain::read
    std::streamsize read(char_type* s, std::streamsize n);
Invokes read on the first filter or device in this chain, which must be non-empty.

Avatar of thready
thready

ASKER

I was thrown off because intellisense didn't show that any read or write functions were available.  I guess intellisense doesn't work with templates?  Thanks again, I needed the kick and it now works!  :-)