#ifndef HEADER #define HEADER #include <iostream> double foobar(){ cout << "hello"; return 0; } #endif // ^^^^^^^^^^ #include "HEADER" int main(){ return foobar(); }
Standard input is empty
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 ^
Standard output is empty