简体   繁体   中英

two non type template parameter constants

maybe I don't quite understand what's going on behind the scenes, but in my understanding, the compiler is just injecting the parameters and evaluating at compile time,

I'm trying to make a matrix class that uses templates and overloaded operators to enforce matrix multiplication rules with the compiler,

template<unsigned int ROWS,unsigned int COLS>
class Matrix{
    public:
        Matrix<ROWS,COLS>(){
...

doesn't compile though

are multiple integers as arguments not supported? or is there some syntax that I can use to achieve the desired results

wow I didn't expect to get responses so fast! after seeing some of the comments, I re-entered the code and it worked, so I guess I must have mis-typed something

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM