Borderou de evaluare (job #3235052)

Utilizator Mihai_OctMihai Octavian Mihai_Oct Data 13 iunie 2024 18:38:50
Problema Perle Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'bool Calc(std::string)': main.cpp:10:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 10 | for(int i = 0; i < c.size(); i++) { | ~~^~~~~~~~~~ main.cpp:11:32: error: 'v' was not declared in this scope 11 | if(c[i] == 'A') c[i] = v[i] + '0'; | ^ main.cpp:15:16: error: 'v' was not declared in this scope 15 | if(v[i] == 1) c.insert(i, "1A3AC"); | ^ main.cpp:21:16: error: 'v' was not declared in this scope 21 | if(v[i] == 1) c.insert(i, "12A"); | ^ main.cpp:25:12: error: 'v' was not declared in this scope 25 | if(v[i] + '0' != c[i]) return false; | ^ main.cpp:26:21: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare] 26 | if(c.size() > n) return false; | ~~~~~~~~~^~~ main.cpp:28:22: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare] 28 | return (c.size() == n); | ~~~~~~~~~^~~~ main.cpp: In function 'int main()': main.cpp:35:39: error: 'v' was not declared in this scope 35 | for(i = 0; i < n; i++) fin >> v[i]; | ^ Non zero exit status: 1

Ceva nu functioneaza?