Borderou de evaluare (job #3223731)

Utilizator AtraianAndreica Traian Dan Atraian Data 13 aprilie 2024 14:53:40
Problema Aspirator Status done
Runda Universitatea Tehnică din Cluj-Napoca - 2024 - Concurs Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:9:10: error: redefinition of 'std::ifstream in' 9 | ifstream in("aspirator.out"); | ^~ main.cpp:8:10: note: 'std::ifstream in' previously declared here 8 | ifstream in("aspirator.in"); | ^~ main.cpp: In function 'int main()': main.cpp:39:24: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null] 39 | memset(val,NULL,10); | ^~~~ In file included from /usr/include/c++/12.2.1/cstring:42, from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:48, from main.cpp:2: /usr/include/string.h:61:37: note: declared here 61 | extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1)); | ~~~~^~~ main.cpp:77:24: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null] 77 | memset(val,NULL,10); | ^~~~ /usr/include/string.h:61:37: note: declared here 61 | extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1)); | ~~~~^~~ main.cpp:127:13: error: 'out' was not declared in this scope 127 | out<<rez<<'\n'; | ^~~ main.cpp:130:31: error: no match for 'operator/' (operand types are 'float' and 'intructions') 130 | rez = -acos((xf-x)/instr[n-j]); | ~~~~~~^~~~~~~~~~~ | | | | float intructions In file included from /usr/include/c++/12.2.1/ccomplex:39, from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:54: /usr/include/c++/12.2.1/complex:422:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator/(const complex<_Tp>&, const complex<_Tp>&)' 422 | operator/(const complex<_Tp>& __x, const complex<_Tp>& __y) | ^~~~~~~~ /usr/include/c++/12.2.1/complex:422:5: note: template argument deduction/substitution failed: main.cpp:130:41: note: mismatched types 'const std::complex<_Tp>' and 'float' 130 | rez = -acos((xf-x)/instr[n-j]); | ^ /usr/include/c++/12.2.1/complex:431:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator/(const complex<_Tp>&, const _Tp&)' 431 | operator/(const complex<_Tp>& __x, const _Tp& __y) | ^~~~~~~~ /usr/include/c++/12.2.1/complex:431:5: note: template argument deduction/substitution failed: main.cpp:130:41: note: mismatched types 'const std::complex<_Tp>' and 'float' 130 | rez = -acos((xf-x)/instr[n-j]); | ^ /usr/include/c++/12.2.1/complex:440:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator/(const _Tp&, const complex<_Tp>&)' 440 | operator/(const _Tp& __x, const complex<_Tp>& __y) | ^~~~~~~~ /usr/include/c++/12.2.1/complex:440:5: note: template argument deduction/substitution failed: Non zero exit status: 1

Ceva nu functioneaza?