Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 3 years ago

Language

C++

Compiler

gcc 12.2.0

Options
Warnings
Boost 1.81.0
C++2b(GNU)
no pedantic

Author

anonymous

about 3 years ago

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.81.0-gcc-12.2.0/include -std=gnu++2b
prog.cc: In member function 'void Users::loginUsers()':
prog.cc:47:40: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   47 |                 while (correctUsername = false; ) // it'll always be false so it will always initially enter the loop?
      |                        ~~~~~~~~~~~~~~~~^~~~~~~
prog.cc:47:47: error: expected ')' before ';' token
   47 |                 while (correctUsername = false; ) // it'll always be false so it will always initially enter the loop?
      |                                               ^
prog.cc:47:23: note: to match this '('
   47 |                 while (correctUsername = false; ) // it'll always be false so it will always initially enter the loop?
      |                       ^
prog.cc:47:17: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
   47 |                 while (correctUsername = false; ) // it'll always be false so it will always initially enter the loop?
      |                 ^~~~~
prog.cc:47:49: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
   47 |                 while (correctUsername = false; ) // it'll always be false so it will always initially enter the loop?
      |                                                 ^
prog.cc:47:49: error: expected primary-expression before ')' token
prog.cc:45:22: warning: unused variable 'correctPassword' [-Wunused-variable]
   45 |                 bool correctPassword = false;
      |                      ^~~~~~~~~~~~~~~
Exit Code:
1