Possibly really stupid question about data structures

Hello, I am learning about data structures, and the videos i see creates the data structure, for instance a linked list, and then just fills the linked list by adding the data one by one. But how do you add data to a data structure without doing it in the code, adding one by one.

Like an online store, they have all the information about each item, so surely they dont sit and add each item one by one into the data structure? there must be another way to do it. But none of the videos I am learning from show that?

Or am I completely misunderstanding how these work?
you may read from a file
1
2
3
while (input >> a >> b >> c){
   l.append( item(a,b,c) );
}
Topic archived. No new replies allowed.