1 Replies - 887 Views - Last Post: 10 July 2009 - 08:00 PM Rate Topic: -----

#1 nanchuangyeyu   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 26-February 09

How to start a C++ matrix class like this?

Post icon  Posted 10 July 2009 - 07:33 PM

I want to design a two dimensional matrix C++ class of myself. In prospect this class should implement such functions:
1. It should be able to be initialized by a binary data file(a .raw file without any header or format infomation.) with the file name as an argument of its constructor, if necessary, some side information such as the desired size of the matrix will be provided.
2. The following feature of ordinary matrix should be obtained:the summation of all the elements in the matrix.
3. The last requirement is this ordiary operation should be available in this matrix: the corresponding element product of two individual objects of this class(of the same size of course), i.e., the element of some position in the result matrix should be the product of the two elements of the same position in the two object matrices.

It's really a shame for me to list such detailed requirement but do not know how to start. For example, should the matrix be constucted in a traditional way or STL one such as vector. I am a newbie of C++ and just in a mess on this problem. Can some one give me some guide or is there some useful reference? Thank u in advance.

Is This A Good Question/Topic? 0
  • +

Replies To: How to start a C++ matrix class like this?

#2 apw5020   User is offline

  • D.I.C Addict

Reputation: 78
  • View blog
  • Posts: 666
  • Joined: 26-March 09

Re: How to start a C++ matrix class like this?

Posted 10 July 2009 - 08:00 PM

Try the search bar on your right...there are tons of helpful tutorials on this site. Or Google.


This post has been edited by apw5020: 10 July 2009 - 08:00 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1