Wei-Chao Hsu wrote:
>
> I just learn C++ recently and need to rewrite some programs from FORTRAN to
> C++. In the programs, the sizes of matrices are always determined at
> runtime. Passing a multiple dimensional array to a function is very easy to
> FORTRAN, but it seems to be a problem to C/C++.
Arrays in general are a pain in the ass in C++. Especially if they
need to be dynamically sized. A std::vector is much easier to
deal with since it is a first class object. An example
of using a std::vector has already been shown I think.
--
Karl Heinz Buchegger