Borderou de evaluare (job #794604)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Alfanumeric (clasa a 5-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 13 nov. 2024 20:01:04 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:11:25: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'unsigned int'} and 'int' [-Wsign-compare]
11 | while (s.size() < n) s += ' ';
| ~~~~~~~~~^~~
main.cpp:12:22: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'unsigned int'} and 'int' [-Wsign-compare]
12 | if (s.size() > n) s = s.substr(0, n);
| ~~~~~~~~~^~~
main.cpp:13:44: error: no match for 'operator!' (operand type is 'std::string' {aka 'std::__cxx11::basic_string<char>'})
13 | while(s.find(' ',0)<=s.size()-1 && !s="")
| ^~
main.cpp:13:44: note: candidate: 'operator!(bool)' (built-in)
main.cpp:13:44: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
main.cpp:15:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'unsigned int'} [-Wsign-compare]
15 | for(i=0;i<=s.size()-1;i++)
| ~^~~~~~~~~~~~