Mercurial > hg > octave-nkf
diff liboctave/chMatrix.cc @ 2349:b369227ce3d2
[project @ 1996-07-27 07:59:20 by jwe]
author | jwe |
---|---|
date | Sat, 27 Jul 1996 07:59:22 +0000 |
parents | fb9611cfc9d2 |
children | 905e19d7eef8 |
line wrap: on
line diff
--- a/liboctave/chMatrix.cc +++ b/liboctave/chMatrix.cc @@ -39,6 +39,7 @@ // #include <sys/types.h> // XXX FIXME XXX #include "lo-error.h" +#include "str-vec.h" #include "mx-base.h" #include "mx-inlines.cc" @@ -60,6 +61,18 @@ elem (0, i) = s[i]; } +charMatrix::charMatrix (const string_vector& s) + : MArray2<char> (s.length (), s.max_length ()) +{ + for (int i = 0; i < nr; i++) + { + int nc = s[i].length (); + + for (int j = 0; j < nc; j++) + elem (i, j) = s[i][j]; + } +} + int charMatrix::operator == (const charMatrix& a) const {