Current area: HOME -> C / C++ -> Data Structures Articles
Data Structures
A Generic Searchable Range Collection (.NET)
A common programming task is to match a value to a group of ranges in order to find a value associated with that range. The .NET framework does not provide a collection class to support this functionality so a new generic collection must be created.
Bind C++ enums to strings, combo-boxes, arbitrary data structures
This article presents a set of templates and macros that, with a minimal amount of code, will provide a way to: Associate each enumerator in a C++ enumeration (enum) with strings, and convert between string and enumerator, given either form; Associate each enumerator in an enum, with an arbitrary set of data; Iterate (i.e. loop) over the enumeration, in a type-safe and convenient manner...
C++ Trees Part 1
For all of C++'s brilliance of strongly type-safe generic programming design, its standard library selection leaves much to be desired. Unlike Java, which has libraries for just about everything, C++ only has a handful. These C++ standard libraries are for containers, algorithms, streams and the like. Surprisingly, C++'s list of standard containers does not include a tree container
C++ Trees Part 2
This article is presented in the following fashion: 1. Introduction 2. Terminology 3. Concept of Design 4. Subtleties of the core::tree<> 5. The core::tree<> API 6. Conclusion 7. Acknowledgements 8. References 9. core::tree<> and core::multitree<> source.
Everything you ever wanted to know about C Types
The C Type system has been adapted to a great number of architectures. As C was adapted to new systems, decisions had to be made. Should the int type be the same size on every new system, or should it be the most convenient size on every system, even if this meant it wasn't always the same size? If you learn nothing else from these articles, learn this: On any C language implementation compliant with any C standard ever written, sizeof(char) is exactly one, whether char is eight bits, 16, 60, or 64. If you use the GNU autoconf test for sizeof(char), you might as well tattoo "I don't know what sizeof means" on your forehead.
Introducing Structs
A tutorial for beginners, offerring a look into C++ structures. How structures can be defined, created, accessed and what is their actual use. Includes example code.
Introducing the Catenator
In this article Adam introduces a very sophisticated and useful data structure for efficient string processing, while at the same time revealing some interesting features of C++.
Network World, an International Data Group publication, is the industry's only newsweekly shaping the future of network computing in the enterprise.
subscribe now