prog.cpp:6:13: error: ‘void a::foo()’ should have been declared inside ‘a’
prog.cpp: In function ‘void a::foo()’:
prog.cpp:8:33: error: invalid operands of types ‘const char [6]’ and ‘<unresolved overloaded function type>’ to binary ‘operator<<’
prog.cpp: At global scope:
prog.cpp:11:13: error: ‘void b::foo()’ should have been declared inside ‘b’
prog.cpp: In function ‘void b::foo()’:
prog.cpp:11:13: error: ‘void b::foo()’ conflicts with a previous declaration
prog.cpp:6:6: note: previous declaration ‘void a::foo()’
prog.cpp:13:33: error: invalid operands of types ‘const char [6]’ and ‘<unresolved overloaded function type>’ to binary ‘operator<<’
prog.cpp: In function ‘int main()’:
prog.cpp:18:5: error: ‘foo’ is not a member of ‘a’
prog.cpp:18:5: note: suggested alternative:
prog.cpp:6:6: note: ‘a::foo’
prog.cpp:19:5: error: ‘foo’ is not a member of ‘b’
prog.cpp:19:5: note: suggested alternative:
prog.cpp:6:6: note: ‘a::foo’