[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  used.

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

Vilas Kumar Chitrakaran

Attachment: Complex.hpp
Description: Binary data

Attachment: Complex.t.cpp
Description: Binary data