Borderou de evaluare (job #2409715)
Utilizator | Data | 19 aprilie 2019 12:50:20 | |
---|---|---|---|
Problema | Permsort2 | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:83:18: error: conflicting declaration 'std::vector<int> in'
vector<int> in(n);
^
main.cpp:78:11: note: previous declaration as 'FILE* in'
FILE *in=fopen("permsort2.in","r"),*out=fopen("permsort2.out","w");
^~
main.cpp:85:17: error: no match for 'operator=' (operand types are 'FILE {aka _IO_FILE}' and 'int')
in[i]=i+1;
^
In file included from /usr/include/stdio.h:74:0,
from /usr/include/c++/6/cstdio:42,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:46,
from main.cpp:1:
/usr/include/libio.h:241:8: note: candidate: constexpr _IO_FILE& _IO_FILE::operator=(const _IO_FILE&)
struct _IO_FILE {
^~~~~~~~
/usr/include/libio.h:241:8: note: no known conversion for argument 1 from 'int' to 'const _IO_FILE&'
/usr/include/libio.h:241:8: note: candidate: constexpr _IO_FILE& _IO_FILE::operator=(_IO_FILE&&)
/usr/include/libio.h:241:8: note: no known conversion for argument 1 from 'int' to '_IO_FILE&&'
main.cpp:12:18: error: request for member 'begin' in 'in', which is of pointer type 'FILE* {aka _IO_FILE*}' (maybe you meant to use '->' ?)
#define all(x) x.begin(), x.end()
^
main.cpp:86:13: note: in expansion of macro 'all'
shuffle(all(in),rng);
^~~
main.cpp:12:29: error: request for member 'end' in 'in', which is of pointer type 'FILE* {aka _IO_FILE*}' (maybe you meant to use '->' ?)
#define all(x) x.begin(), x.end()
^
main.cpp:86:13: note: in expansion of macro 'all'
shuffle(all(in),rng);
^~~
main.cpp:90:25: error: 'a' was not declared in this scope
fscanf(in,"%i",&a);
^
main.cpp:79:20: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
fscanf(in,"%i",&n);
^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !