Borderou de evaluare (job #2925839)

Utilizator PHOSSESSEDProsie Radu-Teodor PHOSSESSED Data 16 octombrie 2022 11:18:52
Problema Alpin Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:5:5: error: 'vector' does not name a type 5 | vector<char> str; | ^~~~~~ main.cpp: In member function 'char InParser::getChar()': main.cpp:10:24: error: 'str' was not declared in this scope; did you mean 'ptr'? 10 | if (ptr == int(str.size())) { | ^~~ | ptr main.cpp:14:16: error: 'str' was not declared in this scope; did you mean 'ptr'? 14 | return str[ptr++]; | ^~~ | ptr main.cpp: In constructor 'InParser::InParser(const char*)': main.cpp:36:34: error: class 'InParser' does not have any field named 'str' 36 | InParser(const char* name) : str(1e5), ptr(str.size()), fin(name) { } | ^~~ main.cpp:36:48: error: 'str' was not declared in this scope; did you mean 'ptr'? 36 | InParser(const char* name) : str(1e5), ptr(str.size()), fin(name) { } | ^~~ | ptr main.cpp: At global scope: main.cpp:47:5: error: 'vector' does not name a type 47 | vector<char> str; | ^~~~~~ main.cpp: In member function 'void OutParser::putChar(char)': main.cpp:52:24: error: 'str' was not declared in this scope; did you mean 'ptr'? 52 | if (ptr == int(str.size())) { | ^~~ | ptr main.cpp:56:9: error: 'str' was not declared in this scope; did you mean 'ptr'? 56 | str[ptr++] = chr; | ^~~ | ptr main.cpp: In constructor 'OutParser::OutParser(const char*)': main.cpp:71:35: error: class 'OutParser' does not have any field named 'str' 71 | OutParser(const char* name) : str(1e5), ptr(0), fout(name) { } | ^~~ main.cpp: In destructor 'OutParser::~OutParser()': main.cpp:72:31: error: 'str' was not declared in this scope; did you mean 'ptr'? 72 | ~OutParser() { fout.write(str.data(), ptr); fout.close(); } | ^~~ | ptr main.cpp: In function 'int main()': main.cpp:181:20: error: no match for 'operator<<' (operand types are 'OutParser' and '<unresolved overloaded function type>') 181 | fout << global << endl; | ~~~~~~~~~~~~~~~^~~~~~~ In file included from /usr/include/c++/10/string:55, from /usr/include/c++/10/bits/locale_classes.h:40, from /usr/include/c++/10/bits/ios_base.h:41, from /usr/include/c++/10/ios:42, Non zero exit status: 1

Ceva nu functioneaza?