Borderou de evaluare (job #1306071)
Utilizator | Data | 30 decembrie 2014 15:01:26 | |
---|---|---|---|
Problema | Exp | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:9:18: error: ‘int div’ redeclared as different kind of symbol
int x, nr[2000], div;
^
In file included from /usr/include/c++/4.8/cstdlib:72:0,
from /usr/include/c++/4.8/ext/string_conversions.h:41,
from /usr/include/c++/4.8/bits/basic_string.h:2815,
from /usr/include/c++/4.8/string:52,
from /usr/include/c++/4.8/bits/locale_classes.h:40,
from /usr/include/c++/4.8/bits/ios_base.h:41,
from /usr/include/c++/4.8/ios:42,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/fstream:38,
from user.cpp:1:
/usr/include/stdlib.h:785:14: error: previous declaration of ‘div_t div(int, int)’
extern div_t div (int __numer, int __denom)
^
user.cpp: In function ‘int main()’:
user.cpp:26:13: error: overloaded function with no contextual type information
div = 2;
^
user.cpp:30:22: error: invalid operands of types ‘int’ and ‘<unresolved overloaded function type>’ to binary ‘operator%’
while (x%div == 0)
^
user.cpp:32:18: error: invalid operands of types ‘int’ and ‘<unresolved overloaded function type>’ to binary ‘operator/’
x/=div;
^
user.cpp:32:18: error: in evaluation of ‘operator/=(int, <unresolved overloaded function type>)’
user.cpp:33:23: error: invalid types ‘int [2000][<unresolved overloaded function type>]’ for array subscript
nr[div]++;
^
user.cpp:35:28: error: invalid types ‘bool [2000][<unresolved overloaded function type>]’ for array subscript
while (prim[div] == true)
^
user.cpp:36:20: error: no post-increment operator for type
div++;
^
user.cpp:38:25: error: invalid operands of types ‘short int’ and ‘<unresolved overloaded function type>’ to binary ‘operator<’
if (maxim < div)
^
user.cpp:39:23: error: cannot resolve overloaded function ‘div’ based on conversion to type ‘short int’
maxim = div;
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !