0

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!

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by invisal
0

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.

Edited by Lerner: n/a

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.