ratzeel wrote:
Thanks. The problem gone away by removing the using namespace std line.
A summary of your problem is:
#include <iostream.h>
#include <fstream.h>
using namespace std;
<some code using the names fstream and ios>
line 223: Error: The name fstream is ambiguous, fstream and
std::fstream.
line 345: Error: The name ios is ambiguous, ios and std::ios.
Do you understand why removing
using namespace std;
makes the problem go away?
http://www.parashift.com/c++-faq-lit....html#faq-27.5
You could equally well make the problem go away by including the
standard <iostream> and <fstream> headers instead of <iostream.h> and
<fstream.h>, as the FAQ I first pointed to suggests.
http://www.parashift.com/c++-faq-lit....html#faq-27.4
Your headers ending in .h are non-standard, which means that the next
compiler you use may or may not provide tham at all, and even if it
does, the contents may or may not be the same as what you are used to
using.
On the other hand, if you learn how to use the standard headers, you
will get identical functionality available on every conforming C++
compiler.
If you understand all that and you are happy with the non-standard .h
headers then that's fine. But bear in mind that this group discusses
standard C++ so you won't be able to get help here with code that
relies on your particular implementation of <iostream.h>
Gavin Deane