Borderou de evaluare (job #2779587)

Utilizator cyg_dawidDavid Ghiberdic cyg_dawid Data 4 octombrie 2021 11:56:55
Problema Desen 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:63:46: error: 'sqrt' was not declared in this scope 63 | muchii.push_back ({j + 1, i, (ld)sqrt ((x - coord[j].x) * (x - coord[j].x) + (y - coord[j].y) * (y - coord[j].y))}); | ^~~~ main.cpp:63:127: error: no matching function for call to 'std::vector<edge>::push_back(<brace-enclosed initializer list>)' 63 | muchii.push_back ({j + 1, i, (ld)sqrt ((x - coord[j].x) * (x - coord[j].x) + (y - coord[j].y) * (y - coord[j].y))}); | ^ In file included from /usr/include/c++/10/vector:67, from main.cpp:4: /usr/include/c++/10/bits/stl_vector.h:1187:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = edge; _Alloc = std::allocator<edge>; std::vector<_Tp, _Alloc>::value_type = edge]' 1187 | push_back(const value_type& __x) | ^~~~~~~~~ /usr/include/c++/10/bits/stl_vector.h:1187:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const edge&'} 1187 | push_back(const value_type& __x) | ~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/stl_vector.h:1203:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = edge; _Alloc = std::allocator<edge>; std::vector<_Tp, _Alloc>::value_type = edge]' 1203 | push_back(value_type&& __x) | ^~~~~~~~~ /usr/include/c++/10/bits/stl_vector.h:1203:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<edge>::value_type&&' {aka 'edge&&'} 1203 | push_back(value_type&& __x) | ~~~~~~~~~~~~~^~~ Non zero exit status: 1

Ceva nu functioneaza?