Detalii evaluare #50990807

Rezumat problemă

Detalii

Problema esteArbore Operații I/O estearbore.in/estearbore.out
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #50990807 Utilizator Iuoras Andrei (IuorasAndrei)
Fișier estearbore.cpp Dimensiune 4.38 KB
Data încărcării 17 Mai 2024, 13:32 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

estearbore.cpp: In function 'int main()':
estearbore.cpp:143:1: error: a function-definition is not allowed here before '{' token
 {

 ^
estearbore.cpp:146:12: error: cannot call constructor 'Real::Real' directly [-fpermissive]
 Real::Real()

            ^
estearbore.cpp:146:12: error:   for a function-style cast, remove the redundant '::Real' [-fpermissive]
estearbore.cpp:147:1: error: expected ';' before '{' token
 {

 ^
estearbore.cpp:149:12: error: expected primary-expression before 'const'
 Real::Real(const double x)

            ^
estearbore.cpp:149:26: error: cannot call constructor 'Real::Real' directly [-fpermissive]
 Real::Real(const double x)

                          ^
estearbore.cpp:149:26: error:   for a function-style cast, remove the redundant '::Real' [-fpermissive]
estearbore.cpp:150:1: error: expected ';' before '{' token
 {

 ^
estearbore.cpp:153:23: error: cannot call member function 'Real::operator double() const' without object
 Real::operator double() const

                       ^
estearbore.cpp:153:25: error: expected ';' before 'const'
 Real::operator double() const

                         ^
estearbore.cpp:157:1: error: a template declaration cannot appear at block scope
 template <class T> void Real::operator=(const T x)

 ^
estearbore.cpp:161:1: error: expected ';' before 'template'
 template <class T> bool Real::operator==(const T x) const

 ^
estearbore.cpp:165:1: error: a template declaration cannot appear at block scope
 template <class T> bool Real::operator<(const T x) const

 ^
estearbore.cpp:169:1: error: expected ';' before 'template'
 template <class T> bool Real::operator<=(const T x) const

 ^
estearbore.cpp:173:1: error: a template declaration cannot appear at block scope
 template <class T> bool Real::operator>(const T x) const

 ^
estearbore.cpp:177:1: error: expected ';' before 'template'
 template <class T> bool Real::operator>=(const T x) const

 ^
estearbore.cpp:182:1: error: a function-definition is not allowed here before '{' token
 {

 ^
estearbore.cpp:186:1: error: a function-definition is not allowed here before '{' token
 {

 ^
estearbore.cpp:191:1: error: a function-definition is not allowed here before '{' token
 {

 ^
estearbore.cpp:199:1: error: expected '}' at end of input
 }

 ^

Cum funcționează evaluarea?

www.pbinfo.ro permite evaluarea a două tipuri de probleme:

  • probleme la care rezolvarea presupune scrierea unui program complet
  • probleme la care rezolvarea presupune scrierea unei secvențe de program - câteva instrucțiuni, o listă de declarații, una sau mai multe funcții, etc.

Problema esteArbore face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:

  • Programul sursă este compilat folosind compilatorul corespunzător. Dacă în urma compilării se obțin erori sau avertismente, acestea sunt afișate în această pagină.
  • Dacă programul a fost compilat, executabilul obținut va fi rulat, furnizându-i-se unul sau mai multe seturi de date de intrare, în concordanță cu restricțiile specifice problemei. Pentru fiecare set de date se obține un anumit punctaj, în raport cu corectitudinea soluției tale.

Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.