Now, I want to implement the methods in a Matrix.cpp file.
But my IDE (vscode) throws two errors: argument list for class template "Matrix" is missing
and: identifier "cols" is undefined
Can somebody tell me why this happens? Thanks!
But I get two errors, in Matrix.h:"class template "Matrix<Type>" has no member "print" "although I made sure that I saved all the changes and as you can see - print is in there. Also I get "no instance of constructor "Matrix<Type>::Matrix [with Type=float]" matches the argument list" in Matrix.cpp
I don't really know how to fix line 20 (I think you mean 19), I have searched a bit on SO and another forum but their questions didn't relate precisely to mine.
Yeas - much better. I tried that originally but obviously got an error due to the incorrect definition for data. I was messing around with the constructor before I realised the definition type was incorrect. I forget to change the constructor code back as I was doing something else at the time. Ahhh..
also try to find the first error that relates to your code. You might first get errors relating to the c++ standard library. That will be the line in your code that is causing an error.