CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003
    Posts
    90

    Question giving input to a code

    i have 5 different matrix of same dimension.

    i want to give input to my code depending upon user's choice of which matrix he wants....

    can you tell me which way i should do it?

    should i write matrices in five different file?

    and read from file.


    what would the best way to do it??

    any suggestion plz.

    thanks

  2. #2
    Join Date
    Dec 2003
    Posts
    99
    Hi,
    Use memory for storing marices only if:
    1. Efficiency is a big concern
    2. Your matrix is of small dimensions and you do not have too many matrices to store.

    But since you have only a single matrix being read depending on the user, *files* is a better option (since the other matrices will be wasting memory )
    As far as eficiency is concerned, apart from the initial overhead of loading the matrix from file to a temporary variable, there will be no difference at all.

    Once you decide to use files, having the matrices in separate files is a modular, efficient, scalable and hence the best approach.


    Regards,

  3. #3
    Join Date
    Aug 2003
    Posts
    90
    yes...your suggestion is reasonable.....thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured