[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

problems with templates.

Hi programmers,

I am quite a novice C++ programmer trying to make some
sense out of
templates. I have atached a program here that compiles
well in MSvisual C++
but does not compile in GNU C++ compiler. The program
compiles without
problems in both the compilers if I dont define the
class as a
template...ie, I use the class only for defining
complex numbers whose real
and imaginary parts are type 'double'.....no templates

There is something wrong I am doing with the
overloading of ostream and
istream operators. Can anybody help?

Vilas Kumar Chitrakaran

Do You Yahoo!?
Yahoo! Messenger - Talk while you surf!  It's FREE.

Attachment: Complex.t.cpp
Description: Complex.t.cpp

Attachment: Complex.hpp
Description: Complex.hpp