0

I have read a 2 files into 1D arrays. These files contain values that should be in a matrix of sizes 768 x 1024, and 49 x 36 respectively.

I have a base class which classes for the two different sizes inherit from.

I'd now like to convert these 1D arrays into the matrix format using vectors in the base class which the two would inherit, but I'm not sure how to go about this and have found little useful information.

Can anyone help?

Gabby2805
  • 1
  • 1
  • 1
  • related https://stackoverflow.com/questions/2076624/c-matrix-class https://codereview.stackexchange.com/questions/155811/basic-matrix-class-in-c https://codereview.stackexchange.com/questions/112030/matrix-operations-using-classes http://www.drdobbs.com/a-c-matrix-template-class/184403323 – Ray Tayek Dec 13 '18 at 23:51
  • 1
    This may be of some help: https://stackoverflow.com/questions/53038457/what-is-the-best-modern-c-approach-to-construct-and-manipulate-a-2d-array/53038618#53038618 – Galik Dec 14 '18 at 01:03
  • Unrelated: With the limited information given it's hard to be certain, but this sounds like a case where you should go with the conventional wisdom and [Prefer Composition Over Inheritance](https://en.wikipedia.org/wiki/Composition_over_inheritance). – user4581301 Dec 14 '18 at 01:20

0 Answers0