I've been doing research on data structures but I just can't really wrap my head around what they are. I'm thinking classes, enums, structs are data structures; but then I also see linked lists and queus, etc that I don't understand either. Could anyone tell me what they are, what they're used for, why are they so important, why do I keep hearing about them, are they good for game programming? This would be very helpful thank you!

Recommended Answers

All 2 Replies

AStually classes and enums and structs allow the user to create their own variable types so we aren't restricted to using just native types (sometimes called plain old data types) like int, long, double, char, etc. Data structures are variables that can hold multiple examples of the same type. Arrays and lists are data structures that are native to C++. The Standard Template Library also as classes for data structures like vectors, strings, lists, stacks, queues and some others. You don't have to use the STL classes however, you can write your code to create your own data structures so they behave exactly as you want, if you want. Sometimes people also put things like databases in data structures, but that is debateable, and depends on how you define what a database is.

In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.
This definition is taken from Wikipedia.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.