Alrighty back to the drawing board then, I'm obviously missing something.
That would be: templates are resolved at compile-time. You are trying to do things with them at run-time.
Just to be clear, you can use the instantiations of templates at run-time; that's not what you are trying to do.
Code:
int sSize;
std::cin >> sSize;
std::array<int, s> sData; // This will never work regardless of decorations.
// The value of the variable `sSize' is unknown at compile-time so the compiler can not
// build a class based on the `std::array<???, ???>' template.
Code:
int sSize;
std::cin >> sSize;
std::vector<int> sData(sSize); // This works.
// The compiler knows everything it needs to know to build the class based on the `std::vector<???>' template.
// The variable `sData' is an instance of the class that the compiler builds.
Soma