IO Streams

G

Guest

This will most definitely seem n(oo|ew)bish but I come seeking guidance in
the ways of "IO Streams". I have Bjarne's book but sadly it does not seem to
delve into streams a whole (at least from a practical stand point -- but I
do not think that is his goal). My ultimate goal will be, for academic
purposes, to create a pseudo high level set of classes for network
communication. However it is not my immediate goal.

My immediate goal is to understand the relationship between streams and
buffers and how they work... As an example:
This doesn't work:
std::basic_iostream< char > BrokenStream;
// I get "unable to find appropriate constructor" with the MS compiler.

Instead I first need to derive a class from "basic_iostream" ala:
class CharIOStream : public std::basic_iostream< char >
{
public:
CharIOStream( void ) : std::basic_iostream< char >( 0 ){ return; }
};
// This works for reasons I do not understand yet.


In closing I'd be most appreciative if someone could point me to a resource
online that takes the steps through these wonderful streams and buffers. At
the moment I'd prefer an online resource; I have found countless
recommendations to many C++ IO based books and they are awaiting me perusal.
:)

tyi!
 
S

Sharad Kala

In closing I'd be most appreciative if someone could point me to a resource
online that takes the steps through these wonderful streams and buffers. At
the moment I'd prefer an online resource; I have found countless
recommendations to many C++ IO based books and they are awaiting me
perusal.

I don't know of an online resource but Langer & Kreft's "Standard C++
IOStreams and Locales" is definitely a book to read, if you want to know
IOStreams well enough.

-Sharad
 
M

Mike Tyndall

This will most definitely seem n(oo|ew)bish but I come seeking guidance in
the ways of "IO Streams". I have Bjarne's book but sadly it does not seem to
delve into streams a whole (at least from a practical stand point -- but I
do not think that is his goal). My ultimate goal will be, for academic
purposes, to create a pseudo high level set of classes for network
communication. However it is not my immediate goal.

My immediate goal is to understand the relationship between streams and
buffers and how they work... As an example:
This doesn't work:
std::basic_iostream< char > BrokenStream;
// I get "unable to find appropriate constructor" with the MS compiler.

Instead I first need to derive a class from "basic_iostream" ala:
class CharIOStream : public std::basic_iostream< char >
{
public:
CharIOStream( void ) : std::basic_iostream< char >( 0 ){ return; }
};
// This works for reasons I do not understand yet.


In closing I'd be most appreciative if someone could point me to a resource
online that takes the steps through these wonderful streams and buffers. At
the moment I'd prefer an online resource; I have found countless
recommendations to many C++ IO based books and they are awaiting me perusal.
:)

Maybe this?
http://www.cplusplus.com/ref/iostream/
It looks pretty detailed.

//mike tyndall
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top