RE: [Dev-C++] cannot compile matrix class
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <no...@ya...> - 2002-02-28 13:24:44
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of h.r...@gm...
> Sent: Thursday, February 28, 2002 7:34 AM
> To: dev...@li...
> Subject: [Dev-C++] cannot compile matrix class
>
>
> Hello,
> I try the following example from Stroustrub "The C++
> programming language" ( the german edition), but it does not
> compile and I can't find the errors. Can everyone help me ?
> Thanks in advance greetings Horst
>
>
> the .h file:
>
> #ifndef array2D_H
> #define array2D_H
>
> #include <valarray>
#include <cstddef> // For size_t
using namespace std;
>
> class Matrix
> {
> valarray<double>* v;
> size_t d1, d2;
> public:
> Matrix (size_t x, size_t y);
> Matrix& Matrix(const Matrix&);
Constructor can't have a return value.
> Matrix& operator=(const Matrix&);
> ~Matrix();
>
> size_t size() const { return d1 * d2; }
> size_t dim1() const { return d1; }
> size_t dim2() const { return d2; }
> Slice_iter<double> zeile (size_t i);
> Cslice_iter<double> zeile (size_t i) const;
>
> Slice_iter<double> spalte (size_t i);
> Cslice_iter<double> spalte (size_t i) const;
Where are Slice_iter, e.t.c. types defined?
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.d2g.com
* Alternative URL: http://run.to/noicys
>
|