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?
Who is Participating?
EuchreManConnect With a Mentor Commented:
Make a data class for each of the dialogs and store the
dialog-specific data there.

Create a global CObject list with pointers to those data objects.

Use AddList to add each dialog's data to it as you OK out
of each dialog.
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
SixStringAuthor Commented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.