Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

hello2k1

variants

This topic is 5799 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
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).

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!