Main.cpp:35:2: error: expected ';' after struct definition
35 | }
| ^
| ;
Main.cpp: In member function 'void Arbre::init(int)':
Main.cpp:40:19: error: invalid operands of types 'int' and 'double' to binary 'operator<<'
40 | int nbNoeuds = 1<<ceil(log2(N));
| ~^~~~~~~~~~~~~~~
| | |
| int double
Main.cpp:47:5: error: '__gnu_cxx::__alloc_traits<std::allocator<Personne>, Personne>::value_type' {aka 'struct Personne'} has no member named 'noeuds'
47 | noeuds[i].maxi = personnes[nbNoeuds-1+i].
| ^~~~~~
Main.cpp:48:5: error: '__gnu_cxx::__alloc_traits<std::allocator<Personne>, Personne>::value_type' {aka 'struct Personne'} has no member named 'noeuds'
48 | noeuds[i].calc = nbGauche;
| ^~~~~~
Main.cpp:56:28: error: no matching function for call to 'Arbre::get_filsgauche()'
56 | int g = get_filsgauche();
| ^
Main.cpp:75:6: note: candidate: 'int Arbre::get_filsgauche(int)'
75 | int get_filsgauche (int N) {
| ^~~~~~~~~~~~~~
Main.cpp:75:6: note: candidate expects 1 argument, 0 provided
Main.cpp:56:9: warning: unused variable 'g' [-Wunused-variable]
56 | int g = get_filsgauche();
| ^
Main.cpp: In member function 'Noeud Arbre::fusion(Noeud, Noeud, Noeud)':
Main.cpp:66:21: error: no matching function for call to 'max()'
66 | parent.calc = max();
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from Main.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
Main.cpp:66:21: note: candidate expects 2 arguments, 0 provided
66 | parent.calc = max();
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from Main.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: template argument deduction/substitution failed:
Main.cpp:66:21: note: candidate expects 3 arguments, 0 provided
66 | parent.calc = max();
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from Main.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
3480 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: template argument deduction/substitution failed:
Main.cpp:66:21: note: candidate expects 1 argument, 0 provided
66 | parent.calc = max();
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from Main.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: template argument deduction/substitution failed:
Main.cpp:66:21: note: candidate expects 2 arguments, 0 provided
66 | parent.calc = max();
| ^
Main.cpp: In member function 'int Arbre::get_filsgauche(int)':
Main.cpp:77:25: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
77 | int offset = 1<<depth -1;
| ~~~~~~^~
Main.cpp:79:26: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
79 | return 1<<(depth+1) -1 +offset/2;
| ~~~~~~~~~~~~~^~~~~~~~~
Main.cpp:78:7: warning: unused variable 'pos' [-Wunused-variable]
78 | int pos = N - offset;
| ^~~
Main.cpp: In member function 'int Arbre::get_parent(int)':
Main.cpp:84:25: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
84 | int offset = 1<<depth -1;
| ~~~~~~^~
Main.cpp:86:26: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
86 | return 1<<(depth-1) -1 +offset*2;
| ~~~~~~~~~~~~~^~~~~~~~~
Main.cpp:85:7: warning: unused variable 'pos' [-Wunused-variable]
85 | int pos = N - offset;
| ^~~