I have templated a variable.
This should be declared later in the code with the exact type. Can someone help me here for a solution/alternative for solve this problem?
(It must be declared beforehand, since it is addressed several times in the code)
int main(int argc, char* argv[]) { 
 
 template<typename MatType> 
 Matrix<MatType> A;
 
 ...
 while(program) {
   auto file = type_filename();
   intmatrix    = checkfile(file);
   doublematrix = checkfile(file);
 
   if (intmatrix)    { A = Matrix<int>(2,2);}
 
   if (doublematrix) { A = Matrix<double>(2,2);}
 
   program = waitforinput();
 }
 
    