Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 4 years ago

Language

C++

Compiler

gcc HEAD 12.0.0 20210520 (experimental)

Options
Warnings
Optimization
Don't Use Boost
C++2a
no pedantic
Raw compiler options
-pedantic -pthread

Author

anonymous

almost 4 years ago

$ g++ prog.cc -Wall -Wextra -O2 -march=native -std=c++2a -pedantic -pthread
prog.cc:1:24: error: 'string' is not a member of 'std'
    1 | bool binarySearch(std::string searchWord, int a, int b) {
      |                        ^~~~~~
prog.cc:1:1: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
  +++ |+#include <string>
    1 | bool binarySearch(std::string searchWord, int a, int b) {
prog.cc:1:43: error: expected primary-expression before 'int'
    1 | bool binarySearch(std::string searchWord, int a, int b) {
      |                                           ^~~
prog.cc:1:50: error: expected primary-expression before 'int'
    1 | bool binarySearch(std::string searchWord, int a, int b) {
      |                                                  ^~~
prog.cc:1:55: error: expression list treated as compound expression in initializer [-fpermissive]
    1 | bool binarySearch(std::string searchWord, int a, int b) {
      |                                                       ^
Exit Code:
1