473,387 Members | 1,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

#include <iostream.h>

when i use #include <iostream.h> in some files
i get lots of error messages of the kind 'ambiguous symbol
this is solved when i use #include <iostream
why is that ? and can i use #include <iostream.h> in some way

examples to the error messages

c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\streamb.h(90): error C2872: 'ios' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\streamb.h(90): error C2872: 'ios' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(258): error C2872: 'ios' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(258): error C2872: 'ios' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(258): error C2872: 'ios' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\istream.h(64): error C2872: 'ios' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\streamb.h(90): error C2872: 'ios' : ambiguous symbo
could be 'c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(106) : ios
or 'c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\iosfwd(462) : std::ios
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\istream.h(139): error C2872: 'istream' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\istream.h(149): error C2872: 'istream' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(272): error C2872: 'ostream' : ambiguous symbo
could be 'c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(104) : ostream
or 'c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\iosfwd(465) : std::ostream
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(159): error C2872: 'ostream' : ambiguous symbo
could be 'c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(104) : ostream
or 'c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\iosfwd(465) : std::ostream
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(160): error C2872: 'ostream' : ambiguous symbo
could be 'c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(104) : ostream
or 'c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\iosfwd(465) : std::ostream
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(219): error C2872: 'ostream' : ambiguous symbo
could be 'c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(104) : ostream
or 'c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\iosfwd(465) : std::ostream
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(146): error C2872: 'streambuf' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\streamb.h(158): error C2872: 'streambuf' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\streamb.h(159): error C2872: 'streambuf' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(290): error C2872: 'streambuf' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\istream.h(67): error C2872: 'streambuf' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\istream.h(90): error C2872: 'streambuf' : ambiguous symbo
Nov 17 '05 #1
1 4531
ya man wrote:
when i use #include <iostream.h> in some files ,
i get lots of error messages of the kind 'ambiguous symbol'
this is solved when i use #include <iostream>
why is that ? and can i use #include <iostream.h> in some way ?


You're trying to mix <iostream> and <iostream.h> in a single translation
unit?

Short answer: don't. Just get rid of <iostream.h>, since it's not supported
in VC7.1 (or later) anyway.

-cd
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: John Tiger | last post by:
Can anybody have idea about the difference between #include <iostream.h> and #include <iostream>. Is later one valid statement on any compiler. I tried compiling on MSVC second statement give...
11
by: Charles L | last post by:
I have read that the inclusion of <fstream.h> makes the inclusion of <iostream.h> unnecessary. Is this correct? Charles L
9
by: ai | last post by:
Hi , I have an application which has to read files of size few mba nd read them into array . Since i am using STL and std namespace to avoid the error error C2872: 'ifstream' : ambiguous...
9
by: nichas | last post by:
I tried to use #include<iostream> in visual C++ compiler but then it didnt work but i see this is the way it is being mentioned in C++ primer by lippman and lajoie.. where is the problem.. Do...
3
by: ajay2552 | last post by:
Hi, I have a query. All html tags start with < and end with >. Suppose i want to display either '<' or '>' or say some text like '<Company>' in html how do i do it? One method is to use &lt,...
14
by: Michael | last post by:
Since the include function is called from within a PHP script, why does the included file have to identify itself as a PHP again by enclosing its code in <?php... <?> One would assume that the...
11
by: gumboots | last post by:
Hi there guys, I've recently purchased "Sam's Teach Yourself C++ Fifth Edition" (About a week before the 6th edition came out) I'm trying to work through the book, but in trying to compile Hello...
3
by: abdulmahmud | last post by:
can anybody please tell me why my program in visual C++ 2008 is not running due error #include<iostream.h>?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.