A
aurgathor
Howdy,
I got the templatized class Matrix working in the way
it's written in the faq [16.18] , and it works fine as:
Matrix<sqr_T> display(80,25);
However, I'd like to have this variable in the private
section of another class, and I'd like to instantiate in
the class's constructor, with the option of having a size
determined at run-time.
Currently, my class looks like this:
class UI {
public:
UI();
~UI();
//etc
private:
sqr_T display[80][25];
// etc
}
I know I need to add an UI(short, short), but that's
the easy part -- I couldn't figure out the proper
syntax to include the templatized version of display.
Any idea?
TIA
I got the templatized class Matrix working in the way
it's written in the faq [16.18] , and it works fine as:
Matrix<sqr_T> display(80,25);
However, I'd like to have this variable in the private
section of another class, and I'd like to instantiate in
the class's constructor, with the option of having a size
determined at run-time.
Currently, my class looks like this:
class UI {
public:
UI();
~UI();
//etc
private:
sqr_T display[80][25];
// etc
}
I know I need to add an UI(short, short), but that's
the easy part -- I couldn't figure out the proper
syntax to include the templatized version of display.
Any idea?
TIA