fork download
  1. #ifndef HEADER
  2. #define HEADER
  3.  
  4. #include <iostream>
  5.  
  6. double foobar(){
  7. cout << "hello";
  8. return 0; }
  9.  
  10. #endif
  11.  
  12. // ^^^^^^^^^^ #include "HEADER"
  13.  
  14. int main(){
  15. return foobar();
  16. }
  17.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'double foobar()':
prog.cpp:7:2: error: 'cout' was not declared in this scope
  cout << "hello";
  ^
prog.cpp:7:2: note: suggested alternative:
In file included from prog.cpp:4:0:
/usr/include/c++/4.9/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^
stdout
Standard output is empty