Borderou de evaluare (job #3136619)
Utilizator | Data | 7 iunie 2023 11:29:50 | |
---|---|---|---|
Problema | A+B | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In member function 'Matrix Matrix::operator*(const Matrix&) const':
main.cpp:30:36: error: passing 'const Matrix' as 'this' argument discards qualifiers [-fpermissive]
30 | result[i][j] += (*this)[i][k] * rhs[k][j];
| ^
main.cpp:21:16: note: in call to 'std::vector<long long int, std::allocator<long long int> >& Matrix::operator[](int)'
21 | vector <ll>& operator [] (const int i){
| ^~~~~~~~
main.cpp:30:48: error: passing 'const Matrix' as 'this' argument discards qualifiers [-fpermissive]
30 | result[i][j] += (*this)[i][k] * rhs[k][j];
| ^
main.cpp:21:16: note: in call to 'std::vector<long long int, std::allocator<long long int> >& Matrix::operator[](int)'
21 | vector <ll>& operator [] (const int i){
| ^~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !