fork download
  1. template <class T, int const ROWNUM, int const COLNUM>
  2. class Matrix
  3. {
  4. };
  5.  
  6. Matrix<bool,5,20> m1;
  7.  
  8. template <class T>
  9. class Matrix2
  10. {
  11. static int const ROWNUM = 5;
  12. static int const COLNUM = 20;
  13. };
  14.  
  15. Matrix<bool> m2;
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:15: error: wrong number of template arguments (1, should be 3)
prog.cpp:2: error: provided for ‘template<class T, int ROWNUM, int COLNUM> class Matrix’
prog.cpp:15: error: invalid type in declaration before ‘;’ token
stdout
Standard output is empty