Solved

derivating STL ostream

Posted on 1997-05-11
3
310 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
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.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

740 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