works fine using gcc

D

deodiaus

In my program I
#include <ostream>
#include <iostream>//cout
#include <strstream>
---------------------------------
I am using vcdev 6 and getting the following error
c:\program files\microsoft visual studio\vc98\include\strstream(87)
'ostream' : base class undefined


any ideas why??
Could it be that I might have a
#include <fstream.h>
somewhere
which is obsolete,and had a warning from gcc?
 
V

Victor Bazarov

deodiaus said:
In my program I
#include <ostream>
#include <iostream>//cout
#include <strstream>
---------------------------------
I am using vcdev 6 and getting the following error
c:\program files\microsoft visual studio\vc98\include\strstream(87)
'ostream' : base class undefined


any ideas why??
Could it be that I might have a
#include <fstream.h>
somewhere
which is obsolete,and had a warning from gcc?

Perhaps you need to bring 'ostream' name to the global namespace
before including the old header <strstream>. Otherwise, try to
use <sstream>, it's newer and therefore better.

Victor
 
M

Martijn Lievaart

In my program I
#include <ostream>
#include <iostream>//cout
#include <strstream>
---------------------------------
I am using vcdev 6 and getting the following error
c:\program files\microsoft visual studio\vc98\include\strstream(87)
'ostream' : base class undefined


any ideas why??
Could it be that I might have a
#include <fstream.h>
somewhere
which is obsolete,and had a warning from gcc?

Yes, this is your problem. Some versions of MSVC have big problems mixing
old and new streams. It is a bad idea anyhow, so don't do that(tm).

HTH,
M4
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top