mr_ped Messages: 826 Registered: November 2005 Location: Czech Republic - Praha
Experienced Contributor
Usually this is solved by defining your own class/struct, something like
struct ArrayWithVal {
Array<int> ints;
Value userValue;
};
In C++ probably construction like
class ArrayWithVal : public Array<int> {
Value userValue;
};
(err.. you should probably write that as template)
would maybe give you advantage in some situations (ability to store both Array<> and ArrayWithVal into the Array<> * pointer, or to give some function ArrayWithVal instead of Array<>, etc..)
Depends on what you need and how much sure you are about what you are doing, when you are designing new class.