ID 5480615
Пользователь Миронов Александр Сергеевич
Время 18:52<< 13.10.2021 18:54 (28 д. 09:27) 18:54>>
Обработка 18:54 ... 18:54 (5,12 сек.)
Файл 5480615.cpp (CLang++ 5.0.0 + Address Sanitizer)
Турнир 2 курс. Программирование на C++. Турнир 1, осень 2021
Задача B: Finite Field (Hard version)
Набор тестов
Ограничения Время: 5с Память: 512Мб
Состояние  [?]
CE Ошибка компиляции
код | результаты
In file included from main.cpp:8:0:
num.cpp: In member function 'Num& Num::operator=(const Num&)':
num.cpp:9:12: error: invalid initialization of non-const reference of type 'Num&' from an rvalue of type 'Num*'
     return this;
            ^~~~
num.cpp: At global scope:
num.cpp:20:18: error: expected type-specifier before '(' token
 Num Num::operator(const Num &other) {
                  ^
num.cpp: In member function 'Num& Num::operator-=(const Num&)':
num.cpp:46:12: error: invalid initialization of non-const reference of type 'Num&' from an rvalue of type 'Num*'
     return this;
            ^~~~
num.cpp: At global scope:
num.cpp:49:6: error: redefinition of 'Num& Num::operator=(const Num&)'
 Num &Num::operator=(const Num &other) {
      ^~~
num.cpp:6:6: note: 'Num& Num::operator=(const Num&)' previously defined here
 Num &Num::operator=(const Num &other) {
      ^~~
num.cpp: In member function 'Num& Num::operator-=(int)':
num.cpp:63:12: error: invalid initialization of non-const reference of type 'Num&' from an rvalue of type 'Num*'
     return this;
            ^~~~
num.cpp: At global scope:
num.cpp:66:6: error: prototype for 'Num& Num::operator=(int)' does not match any in class 'Num'
 Num &Num::operator=(int num) {
      ^~~
num.cpp:6:6: error: candidate is: Num& Num::operator=(const Num&)
 Num &Num::operator=(const Num &other) {
      ^~~
0.030s 0.009s 9