We help IT Professionals succeed at work.

derivating STL ostream

irsupvbo
irsupvbo asked
on
Medium Priority
330 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 .
Comment
Watch Question

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?
What errors do you get?
Commented:
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..

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.