template <class Type, int SIZE>
class Array
{
Type arr[SIZE]; // 静的メモリが確保できる!
public:
Array() {}
};
int main() {
Array<int, 100> array;
return 0;
}
ICAgIHRlbXBsYXRlIDxjbGFzcyBUeXBlLCBpbnQgU0laRT4KICAgIGNsYXNzIEFycmF5CiAgICB7CiAgICBUeXBlIGFycltTSVpFXTsgLy8g6Z2Z55qE44Oh44Oi44Oq44GM56K65L+d44Gn44GN44KL77yBCiAgICBwdWJsaWM6CiAgICBBcnJheSgpIHt9CiAgICB9OwogICAgIAogICAgaW50IG1haW4oKSB7CiAgICBBcnJheTxpbnQsIDEwMD4gYXJyYXk7CiAgICByZXR1cm4gMDsKICAgIH0g