Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 2 years ago

Language

C++

Compiler

gcc 12.1.0

Options
Warnings
Don't Use Boost
C++11
no pedantic

Author

anonymous

over 2 years ago

$ g++ prog.cc -Wall -Wextra -std=c++11
prog.cc: In function 'bool cmp(std::string, std::string)':
prog.cc:8:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    8 |             for(int i=0; i<x.size(); i++){
      |                          ~^~~~~~~~~
prog.cc: In function 'int main()':
prog.cc:21:12: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   21 |     while(i<s.length()){
      |           ~^~~~~~~~~~~
prog.cc:41:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   41 |     for(int x=1; x<s.size()-1; x++){
      |                  ~^~~~~~~~~~~
13,,,
Exit Code:
0