Kobojunkie
Kobojunkie

Reputation: 6535

error C2504: 'ostream_withassign' : base class undefined

I am trying to learn C++ by practicing with exercises from the book but I seem to have run into yet another problem. I know the ostream_withassign class is found in the iostream library and that is included but I still do not understand what I am missing in my code still. I tried std but that does not seem to work either. Any one able to please inform me on what I am missing please. Thanks in Advance!

#include "stdafx.h"
#include "Conios.h"


class ConsoleStream :public ostream_withassign, public Conios
{
protected:
    char X;
    char Y;


public:
    ConsoleStream(void);
    ConsoleStream(std::streambuf * Buffer);
    void SetX(char XX);
    void SetY(char YY);
    ConsoleStream &operator =(std::ostream &Out);
    ~ConsoleStream(void);
};

Upvotes: 0

Views: 424

Answers (1)

bobbymcr
bobbymcr

Reputation: 24167

Your book must be very old (in computing terms). The ostream_withassign class was a nonstandard type available in "iostream.h" back in Visual Studio 6.0. You should probably update your reference material and use something more modern as many, many things have changed in C++ since then (c. 1998). (The most recent updates were standardized this year, in fact.)

Upvotes: 2

Related Questions