Borderou de evaluare (job #2220497)

Utilizator inquisitorAnders inquisitor Data 11 iulie 2018 23:31:22
Problema Algoritmul lui Euclid Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘void read(unsigned int&)’: user.cpp:28:23: warning: suggest parentheses around comparison in operand of ‘|’ [-Wparentheses] while(inBuffer[p] < 0x30 | inBuffer[p] > 0x39) ~~~~~~~~~~~~^~~~~~ user.cpp:33:23: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses] while(inBuffer[p] > 0x2F & inBuffer[p] < 0x3A) ~~~~~~~~~~~~^~~~~~ user.cpp: In function ‘int main()’: user.cpp:50:11: error: invalid initialization of non-const reference of type ‘unsigned int&’ from an rvalue of type ‘unsigned int’ read(T); ^ user.cpp:22:37: note: initializing argument 1 of ‘void read(unsigned int&)’ __attribute__((always_inline)) void read(unsigned int &num) ^~~~ user.cpp:54:15: error: invalid initialization of non-const reference of type ‘unsigned int&’ from an rvalue of type ‘unsigned int’ read(a); ^ user.cpp:22:37: note: initializing argument 1 of ‘void read(unsigned int&)’ __attribute__((always_inline)) void read(unsigned int &num) ^~~~ user.cpp:56:15: error: invalid initialization of non-const reference of type ‘unsigned int&’ from an rvalue of type ‘unsigned int’ read(b); ^ user.cpp:22:37: note: initializing argument 1 of ‘void read(unsigned int&)’ __attribute__((always_inline)) void read(unsigned int &num) ^~~~ user.cpp: At global scope: user.cpp:22:37: warning: always_inline function might not be inlinable [-Wattributes] user.cpp: In function ‘void read(unsigned int&)’: user.cpp:30:23: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] ++p != 0x8000 || (fread(inBuffer, 0x1, 0x8000, stdin), p = 0x0); ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ user.cpp:37:23: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] ++p != 0x8000 || (fread(inBuffer, 0x1, 0x8000, stdin), p = 0x0); ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ user.cpp: In function ‘int main()’: user.cpp:43:38: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("euclid2.in", "r", stdin); ^ user.cpp:44:40: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("euclid2.out", "w", stdout); ^

Ceva nu functioneaza?