Link to home
Start Free TrialLog in
Avatar of SixString
SixString

asked on

Best method for storing/accessing data?

I'm new to C++.  My application needs to read and write a data file containing hundreds of different values.  I want to access those data from a couple dozen different dialog boxes.

What's the "best" way to do this in C++/MFC?  Should I create a class to hold the data, give it a couple hundred static members, and access each of them "globally" via something like CDataClass::m_fTime, CDataClass::m_fVelocity, etc.?

Or is there a better way using templates or MFC list collection classes?
Avatar of Triskelion
Triskelion
Flag of United States of America image

One "best" method is to create an ODBC data source and use the CRecordset class to access/manipulate it.  If you do this, you can keep your data integrity and access the data through various methods. Hines@SprintMail.COM
Avatar of SixString
SixString

ASKER

This isn't really database-type data.  It's a large FORTRAN input data file that will be accessed via a bunch of different dialogs.  I need to store all the disparate data in one area for manipulation.
ASKER CERTIFIED SOLUTION
Avatar of EuchreMan
EuchreMan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial