Solved

derivating STL ostream

Posted on 1997-05-11
3
306 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
multi threaded debug dll option in visual studio 2 109
VS2015 compilation and missing DLLs 9 147
C++ to C# code conversion issue 4 108
How to convert MFC::CString to UTF8 wchar_t* 10 211
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

810 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