s_aslam98 wrote:
if i hv to store the details like, id,name, and class of students
An option is
Object Serialization[
^] a very powerful and elegant mechanism.
All the programming languages you tagged support such technique (
C++
via 'external' libraries, like
MFC
: in fact serialization is one of the good things of
MFC
).
Using object serialization the proper data structure for the student details would be, precisely, a
Student
class and you would have as many instances of such class held by a container of your choice (for instance, using
C++
, a
std::vector
) whenever needed, the serialization mechanism would provide the way to load from file (or store to file) the container content.