Solved

derivating STL ostream

Posted on 1997-05-11
3
295 Views
Last Modified: 2008-02-26
I'd like to derivate STO ostream class. I have problem in doing that coz there is no default ctor for this STL class. I am using VC 5.0 .
0
Comment
Question by:irsupvbo
3 Comments
 

Expert Comment

by:Sigma031497
ID: 1163371
Hmmm... I dont know who wrote your iostream headers (Microsloth?) but mine (g++ under Linux) certainly have default ctors. Indeed thats the standard. Have you read your headers carefully?
0
 
LVL 3

Expert Comment

by:LucHoltkamp
ID: 1163372
What errors do you get?
0
 
LVL 4

Accepted Solution

by:
md041797 earned 100 total points
ID: 1163373
You shouldn't try to derive from ostream.  The correct method is to derive from the streambuf and write new overloads for overflow, underflow, etc..
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now