#include <array>
#include <tuple>
template<unsigned int size>
class MyBase
{
protected:
std::array<int, size*size + 6*size> myArray;
};
template<unsigned int size>
class MyClass : public MyBase<size>
{
public:
void set(int a, int b, float c) {myArray[a] = std::make_tuple(b, c);}
private:
std::array<std::tuple<int, float>, 6> myArray;
};
int main()
{
MyClass<4> m;
m.set(4, 35, 56.885);
return 0;
}
I2luY2x1ZGUgPGFycmF5PgojaW5jbHVkZSA8dHVwbGU+Cgp0ZW1wbGF0ZTx1bnNpZ25lZCBpbnQgc2l6ZT4KY2xhc3MgTXlCYXNlCnsKICAgIHByb3RlY3RlZDoKICAgIHN0ZDo6YXJyYXk8aW50LCBzaXplKnNpemUgKyA2KnNpemU+IG15QXJyYXk7Cn07Cgp0ZW1wbGF0ZTx1bnNpZ25lZCBpbnQgc2l6ZT4KY2xhc3MgTXlDbGFzcyA6IHB1YmxpYyBNeUJhc2U8c2l6ZT4KewogICAgcHVibGljOgogICAgdm9pZCBzZXQoaW50IGEsIGludCBiLCBmbG9hdCBjKSB7bXlBcnJheVthXSA9IHN0ZDo6bWFrZV90dXBsZShiLCBjKTt9CiAgICBwcml2YXRlOgpzdGQ6OmFycmF5PHN0ZDo6dHVwbGU8aW50LCBmbG9hdD4sIDY+IG15QXJyYXk7Cn07CmludCBtYWluKCkKewogICAgTXlDbGFzczw0PiBtOwogICAgbS5zZXQoNCwgMzUsIDU2Ljg4NSk7CiAgICByZXR1cm4gMDsKfQ==