Borderou de evaluare (job #2358397)
Utilizator | Data | 28 februarie 2019 08:26:57 | |
---|---|---|---|
Problema | Cufar | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:11:19: error: 'int div' redeclared as different kind of symbol
int cerinta,n,x,k,div,j,nrdiv[DIM],valmax,i;
^~~
In file included from /usr/include/c++/6/cstdlib:75:0,
from /usr/include/c++/6/ext/string_conversions.h:41,
from /usr/include/c++/6/bits/basic_string.h:5420,
from /usr/include/c++/6/string:52,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from main.cpp:2:
/usr/include/stdlib.h:788:14: note: previous declaration 'div_t div(int, int)'
extern div_t div (int __numer, int __denom)
^~~
main.cpp: In function 'int main()':
main.cpp:23:13: error: overloaded function with no contextual type information
div = 2;
^
main.cpp:26:9: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator%'
if(x%div == 0)
~^~~~
main.cpp:29:13: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator%'
while(x%div == 0)
~^~~~
main.cpp:30:12: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator/'
x /= div;
^~~
main.cpp:30:12: error: in evaluation of 'operator/=(int, <unresolved overloaded function type>)'
main.cpp:33:7: error: no pre-increment operator for type
++div;
^~~
main.cpp:36:27: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator-'
fprintf(fout, "%d", div-1);
~~~^~
main.cpp:62:27: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=]
fprintf(fout, "%d", ans);
^
main.cpp:17:37: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
fscanf(fin, "%d%d", &cerinta,&n);
^
main.cpp:21:30: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
fscanf(fin, "%d%d", &x,&k);
^
main.cpp:42:31: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
fscanf(fin, "%d%d", &x,&k);
^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !