分类: LINUX
2009-06-10 10:03:38
|
Level: Intermediate Tom Copeland (), Developer, InfoEther 28 Jun 2005 In this tutorial, learn how to use the GLib collection data structures to effectively manage data within C programs. In particular, you'll see how to use GLib's built-in data structures/containers -- linked lists, hash tables, arrays, trees, queues, and relations -- to fill the need for them in C. Before you start This tutorial shows you how to use the GLib collections to manage data efficiently and elegantly within your C programs. The GLib collections are the result of many years of refinement and are used by numerous open source programs. These collections provide the more complex data structures/containers (the functions and variables you need to manage data) that are in short supply in the C language. This tutorial is written for Linux™ or UNIX® programmers whose skills and experience are at a beginning to intermediate level.
To get the most out of this tutorial, you should be generally familiar with a UNIX-like environment and know how to use a command-line shell. You also need some basic programming tools to compile the source code examples, such as a compiler like GCC (see the Resources section for downloading GCC); all of the code examples in this tutorial were compiled with GCC 3.4.2. You also need the GLib runtime and development libraries installed. Most modern Linux distributions come with the GLib runtime installed; for example, the "workstation" installation of Fedora Core 3 comes with two GLib RPMs: glib2-2.4.7-1 and glib2-devel-2.4.7-1. |