home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C++ / Snippets / Class_DataList / Read Me next >
Encoding:
Text File  |  1995-12-29  |  803 b   |  5 lines  |  [TEXT/ttxt]

  1. Class_DataList
  2.  
  3. by Hiep Dam <starlabs@aol.com>
  4.  
  5. Class_DataList is similar to a container class, except that the entries in the DataList are variable-sized entities. Note that in order to use variable-sized data, the DataList requires that each entry be prefixed by a length data type. This is most useful for string-like data types - although they *don't* have to be strings. A prime example of the variable-sized data that DataList uses are pascal strings, which are a stream of chars prefixed by a length byte. Because it's only a byte, the string is limited to 255 chars. However, this need not be hard-coded. You can tell DataList what size the length prefix is, thereby setting your own string length limits. All of this makes DataList an extremely useful tool for dealing with variable-sized data.