formulahendry / formulahendry/vscode-code-runner
Code runner wont run on classes[Bug]
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 351
- PR merge metrics
- No merged PRs in 30d
Description
- VS Code Version: 1.54.3
- OS Version: Windows 10
- Code Runner Version: v0.11.3
When I run a class with the code runner, it will show error that the functions inside the class are undefined.
1) I created a class in header file and source file named matrix.hpp and matrix.cpp.
1.1) I created the class Matrix inside the namespace mat.
2) I created the constructor matrix(const int rows, const int cols, double val =0);
3) I created the print function that print out the created matrix object.
When I run the code I get this kind of error:
"undefined reference to 'mat::Matrix::Matrix(int, int, double)'"
"undefined reference to 'mat::Matrix::print()'"
**Expected behavior**
the function should print out matrix like this:
mat::matrix mat(3,4)
mat.print();
// prints out:
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
**Screenshots**

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.