Borderou de evaluare (job #3122198)

Utilizator daristyleBejan Darius-Ramon daristyle Data 17 aprilie 2023 20:33:04
Problema Turnuri2 Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In static member function 'static void stack::init()': main.cpp:20:25: error: invalid use of member 'stack::sp' in static member function 20 | sp = 0; | ^~ main.cpp:12:21: note: declared here 12 | int sp; | ^~ main.cpp: In static member function 'static void stack::push(int)': main.cpp:24:25: error: invalid use of member 'stack::s' in static member function 24 | s[sp++] = x; | ^ main.cpp:13:21: note: declared here 13 | int s[STACK_DIM + 1]; | ^ main.cpp:24:27: error: invalid use of member 'stack::sp' in static member function 24 | s[sp++] = x; | ^~ main.cpp:12:21: note: declared here 12 | int sp; | ^~ main.cpp: In static member function 'static void stack::pop()': main.cpp:28:27: error: invalid use of member 'stack::sp' in static member function 28 | --sp; | ^~ main.cpp:12:21: note: declared here 12 | int sp; | ^~ main.cpp: In static member function 'static int stack::top()': main.cpp:32:32: error: invalid use of member 'stack::s' in static member function 32 | return s[sp - 1]; | ^ main.cpp:13:21: note: declared here 13 | int s[STACK_DIM + 1]; | ^ main.cpp:32:34: error: invalid use of member 'stack::sp' in static member function 32 | return s[sp - 1]; | ^~ main.cpp:12:21: note: declared here 12 | int sp; | ^~ main.cpp: In static member function 'static bool stack::empty()': main.cpp:36:33: error: invalid use of member 'stack::sp' in static member function 36 | return !sp; | ^~ main.cpp:12:21: note: declared here 12 | int sp; | ^~ main.cpp: In static member function 'static void stack::clear()': main.cpp:40:25: error: invalid use of member 'stack::sp' in static member function 40 | sp = 0; Non zero exit status: 1

Ceva nu functioneaza?