jack wrote:
> #include <iostream.h>
> #include <fstream.h>
> #include <vector.h>
Wrong, please read and head the warnings g++ gives.
> template<typename Elemtype>
> class Matrix{
> public:
> Matrix(int row,int column);
> Matrix(Matrix &);
> ~Matrix();
The assignment operator is missing, the compiler-generated one is not
suitable for your class. Maybe that is also the reason of your problem,
because later you do this:
> Matrix<double> t3(4,4);
> cout << t3;
> t3= t+t2;
..which definitely leads to problems.
In general, there are quite a few other mistakes in your program that have
nothing to do with GCC, rather take those to alt.comp.lang.learn.c-c++.
Also, you violated one general rule, you didn't post a minimal example of
code that shows the error.
Uli
--
http://gcc.gnu.org/faq.html
http://parashift.com/c++-faq-lite/
_______________________________________________
Help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus