Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 6 years ago

Language

C++

Compiler

gcc 8.2.0

Options
Warnings
Boost 1.69.0
C++2a(GNU)
no pedantic
Raw compiler options
foo.h

Author

anonymous

over 6 years ago

foo.h

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.69.0/gcc-8.2.0/include -std=gnu++2a foo.h
foo.h: In function 'void foo()':
foo.h:7:10: error: 'cout' is not a member of 'std'
     std::cout << "boo" << std::endl;
          ^~~~
foo.h:7:10: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
foo.h:1:1:
+#include <iostream>
 /* foo.h */
foo.h:7:10:
     std::cout << "boo" << std::endl;
          ^~~~
foo.h:7:32: error: 'endl' is not a member of 'std'
     std::cout << "boo" << std::endl;
                                ^~~~
foo.h:7:32: note: 'std::endl' is defined in header '<ostream>'; did you forget to '#include <ostream>'?
foo.h:1:1:
+#include <ostream>
 /* foo.h */
foo.h:7:32:
     std::cout << "boo" << std::endl;
                                ^~~~
Exit Code:
1