ID 5477277
Пользователь Александренко Владимир Александрович
Время 12.10.2021 21:44 (27 д. 12:18) 21:45>>
Обработка 21:44 ... 21:44 (2,71 сек.)
Файл 5477277.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:7:27: error: 'other' does not name a type; did you mean 'stderr'?
 Num& Num::operator=(const other Num&) {
                           ^~~~~
                           stderr
num.cpp:7:36: error: expected ',' or '...' before '&' token
 Num& Num::operator=(const other Num&) {
                                    ^
num.cpp:7:6: error: prototype for 'Num& Num::operator=(int)' does not match any in class 'Num'
 Num& Num::operator=(const other Num&) {
      ^~~
In file included from main.cpp:7:0:
num.h:7:10: error: candidate is: Num& Num::operator=(const Num&)
     Num& operator=(const Num& other);
          ^~~~~~~~
In file included from main.cpp:8:0:
num.cpp:13:26: error: 'other' does not name a type; did you mean 'stderr'?
 Num Num::operator+(const other Num&) {
                          ^~~~~
                          stderr
num.cpp:13:35: error: expected ',' or '...' before '&' token
 Num Num::operator+(const other Num&) {
                                   ^
num.cpp: In member function 'Num Num::operator+(int)':
num.cpp:14:28: error: 'other' was not declared in this scope
   return Num(this->value + other.value, this->modulo);
                            ^~~~~
num.cpp:14:28: note: suggested alternative: 'stderr'
   return Num(this->value + other.value, this->modulo);
                            ^~~~~
                            stderr
num.cpp:14:53: error: 'Num' cannot be used as a function
   return Num(this->value + other.value, this->modulo);
                                                     ^
num.cpp: At global scope:
num.cpp:17:26: error: 'other' does not name a type; did you mean 'stderr'?
 Num Num::operator-(const other Num&) {
                          ^~~~~
                          stderr
num.cpp:17:35: error: expected ',' or '...' before '&' token
 Num Num::operator-(const other Num&) {
                                   ^
num.cpp: In member function 'Num Num::operator-(int)':
num.cpp:18:28: error: 'other' was not declared in this scope
   return Num(this->value - other.value, this->modulo);
                            ^~~~~
num.cpp:18:28: note: suggested alternative: 'stderr'
   return Num(this->value - other.value, this->modulo);
                            ^~~~~
                            stderr
num.cpp:18:53: error: 'Num' cannot be used as a function
   return Num(this->value - other.value, this->modulo);
                                                     ^
num.cpp: At global scope:
num.cpp:21:26: error: 'other' does not name a type; did you mean 'stderr'?
 Num Num::operator*(const other Num&) {
                          ^~~~~
                          stderr
num.cpp:21:35: error: expected ',' or '...' before '&' token
 Num Num::operator*(const other Num&) {
                                   ^
num.cpp: In member function 'Num Num::operator*(int)':
num.cpp:22:28: error: 'other' was not declared in this scope
   return Num(this->value * other.value, this->modulo);
                            ^~~~~
num.cpp:22:28: note: suggested alternative: 'stderr'
   return Num(this->value * other.value, this->modulo);
                            ^~~~~
                            stderr
num.cpp:22:53: error: 'Num' cannot be used as a function
   return Num(this->value * other.value, this->modulo);
                                                     ^
num.cpp: At global scope:
num.cpp:25:5: error: redefinition of 'Num Num::operator+(int)'
 Num Num::operator+(int num) {
     ^~~
num.cpp:13:5: note: 'Num Num::operator+(int)' previously defined here
 Num Num::operator+(const other Num&) {
     ^~~
num.cpp:29:5: error: redefinition of 'Num Num::operator-(int)'
 Num Num::operator-(int num) {
     ^~~
num.cpp:17:5: note: 'Num Num::operator-(int)' previously defined here
 Num Num::operator-(const other Num&) {
     ^~~
num.cpp:33:5: error: redefinition of 'Num Num::operator*(int)'
 Num Num::operator*(int num) {
     ^~~
num.cpp:21:5: note: 'Num Num::operator*(int)' previously defined here
 Num Num::operator*(const other Num&) {
     ^~~
num.cpp:38:28: error: 'other' does not name a type; did you mean 'stderr'?
 Num& Num::operator+=(const other Num&) {
                            ^~~~~
                            stderr
num.cpp:38:37: error: expected ',' or '...' before '&' token
 Num& Num::operator+=(const other Num&) {
                                     ^
num.cpp: In member function 'Num& Num::operator+=(int)':
num.cpp:39:27: error: 'other' was not declared in this scope
   int res = this->value + other.value;
                           ^~~~~
num.cpp:39:27: note: suggested alternative: 'stderr'
   int res = this->value + other.value;
                           ^~~~~
                           stderr
num.cpp: At global scope:
num.cpp:44:28: error: 'other' does not name a type; did you mean 'stderr'?
 Num& Num::operator-=(const other Num&) {
                            ^~~~~
                            stderr
num.cpp:44:37: error: expected ',' or '...' before '&' token
 Num& Num::operator-=(const other Num&) {
                                     ^
num.cpp: In member function 'Num& Num::operator-=(int)':
num.cpp:45:27: error: 'other' was not declared in this scope
   int res = this->value - other.value;
                           ^~~~~
num.cpp:45:27: note: suggested alternative: 'stderr'
   int res = this->value - other.value;
                           ^~~~~
                           stderr
num.cpp: At global scope:
num.cpp:63:6: error: redefinition of 'Num& Num::operator+=(int)'
 Num& Num::operator+=(int num) {
      ^~~
num.cpp:38:6: note: 'Num& Num::operator+=(int)' previously defined here
 Num& Num::operator+=(const other Num&) {
      ^~~
num.cpp:69:6: error: redefinition of 'Num& Num::operator-=(int)'
 Num& Num::operator-=(int num) {
      ^~~
num.cpp:44:6: note: 'Num& Num::operator-=(int)' previously defined here
 Num& Num::operator-=(const other Num&) {
      ^~~
0.118s 0.009s 9