Borderou de evaluare (job #1494231)

Utilizator deea101Andreea deea101 Data 30 septembrie 2015 20:55:50
Problema Hashuri Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In instantiation of ‘node<T, U>* AVL<T, U>::balance(node<T, U>*) [with T = int; U = bool]’: user.cpp:32:22: required from ‘node<T, U>* AVL<T, U>::priv_insert(node<T, U>*, const T&, const U&) [with T = int; U = bool]’ user.cpp:115:36: required from ‘void AVL<T, U>::insert(const T&, const U&) [with T = int; U = bool]’ user.cpp:145:36: required from here user.cpp:81:33: error: ‘abs’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] if(abs(root->l->h - root->r->h) <= 1) ^ In file included from user.cpp:1:0: /usr/include/c++/4.8/cmath:81:3: note: ‘constexpr double std::abs(double)’ declared here, later in the translation unit abs(double __x) ^ user.cpp: In instantiation of ‘void AVL<T, U>::comp_height(node<T, U>*) [with T = int; U = bool]’: user.cpp:79:19: required from ‘node<T, U>* AVL<T, U>::balance(node<T, U>*) [with T = int; U = bool]’ user.cpp:32:22: required from ‘node<T, U>* AVL<T, U>::priv_insert(node<T, U>*, const T&, const U&) [with T = int; U = bool]’ user.cpp:115:36: required from ‘void AVL<T, U>::insert(const T&, const U&) [with T = int; U = bool]’ user.cpp:145:36: required from here user.cpp:75:44: error: ‘max’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] root->h = 1 + max(root->l->h, root->r->h); ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from user.cpp:128: /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: ‘template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)’ declared here, later in the translation unit max(const _Tp& __a, const _Tp& __b, _Compare __comp) ^

Ceva nu functioneaza?