Re: Help in C++?
Yes, you can design a dynamically array using Linked List. This can grow at run time. As long as you keep on reading file and folderls u can add them to linked list.
It is declared using a structure. Like this
struct filefolder
{
char filename[10];
char foldername[10];
struct filefolder *nextnode;
};
The last item in the above structure is a link to next structure.
The Linked List is like a train where each coach is linked with the next coach by a link. Starting from the engine u can go up to last coach.
U have to preserve the address of the first node. So with the address of the first node u can go up to the last node of the Linked List.
|