>
Why not use a structure containing a type value and a union of the 2
structures that can be passed:
typedef enum
{
firststructure = 1,
secondstructure = 2
} MyStructures;
typedef struct
{
..........
} structure1;
typedef struct
{
........
} structure2;
typedef union
{
structure1 first;
structure2 second;
} MyUnion;
typedef struct
{
MyStructures structur_type;
MyUnion TheStructure;
} TheArgument;
Obviously you would want to name everything appropriately.
So... is there any way of emulating templates in C?
Or do I just have to live with duplicate functions?
>
--
Cheers,
Robbie Hatley
lonewolf aatt well dott com
www dott well dott com slant user slant lonewolf slant
Or do I just have to live with duplicate functions?
>
--
Cheers,
Robbie Hatley
lonewolf aatt well dott com
www dott well dott com slant user slant lonewolf slant
structures that can be passed:
typedef enum
{
firststructure = 1,
secondstructure = 2
} MyStructures;
typedef struct
{
..........
} structure1;
typedef struct
{
........
} structure2;
typedef union
{
structure1 first;
structure2 second;
} MyUnion;
typedef struct
{
MyStructures structur_type;
MyUnion TheStructure;
} TheArgument;
Obviously you would want to name everything appropriately.
Comment