DragonFly BSD
DragonFly users List (threaded) for 2005-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Unix equivalent of a variant??


From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Tue, 1 Feb 2005 22:59:43 +0100
Mail-followup-to: users@crater.dragonflybsd.org

On Tue, Feb 01, 2005 at 04:51:02PM +0000, Jonathon McKitrick wrote:
> I need the equivalent of a variant, however.  A hold-everything variable
> that can be any type in C/C++.  Is there something already out there I can
> use or should I just roll my own?

There's no generic base type in C or C++. The best approximation is a void
pointer, which can be casted on demand.

Joerg



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]