>Subject: Using the STL vector template >From: "C Srinivas" <[EMAIL PROTECTED]> >Date: 19 Nov 2000 06:10:38 -0000 >I have a requirement to use the STL vector template. I'm using >CW R6 and SDK 3.5. The manual says something about setting >up globals to work with templates and STL. I've set the compiler >options to C++, but I'm coding strictly procedural so far, without >using any classes. I need to read a set of records from a database >and store them in a vector. I suppose the immediate question is WHY. The Palm OS (r) PDB format is a memory-based list structure that provides sequential access to elements (records), and access via index number (though not indexed access, which is different). You can also sort the list and insert new elements (records) anywhere in the list. It seems like you should have all the basic functionality you need supplied by the OS. I'd recommend implementing a C++ class to provide a friendly wrapper around the Palm OS API set, and support in-memory extensions. But duplicating all the OS stuff doesn't seem worth the trouble, and unless your database is small you'll run out of heap memory when you load it into memory! Roger Stringer Marietta Systems, Inc. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
