Does anyone know what exactly they are, and how to use them? A friend of mine recommended using them, and gave me a website (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/automat/htm/chap7_5alv.asp?frame=true), but I just can''t find any info I can use.
Thanks.
A varient lets you use a single variable to store many types of data (a pointer to an object, an integer, a float, a string) and convert between them. They are useful in areas like database programming, however they are *slow* (basically every read/write requires a background code to be perform to determine what format the data is currently stored in and what format it must be converted to).
It''s the default VB data-type.
You can use the ATL helper class _variant_t or Boost''s Any type.
Both are pretty easy to use. Any is portable C++ code. _variant_t is ole-automation & COM compatible.
You can use the ATL helper class _variant_t or Boost''s Any type.
Both are pretty easy to use. Any is portable C++ code. _variant_t is ole-automation & COM compatible.
www.boost.org
look for 'any' in documentation
edit:
found the link for you. if you take the time you'll grow to love this site.
[edited by - petewood on August 29, 2002 11:44:39 AM]
look for 'any' in documentation
edit:
found the link for you. if you take the time you'll grow to love this site.
[edited by - petewood on August 29, 2002 11:44:39 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement