#include <iostream> namespace hello { namespace world { struct A {}; } } namespace hello { void print(world::A) { } } namespace hello { namespace world { void print() {} } }; int main() { hello::world::A a; print(a); return 0;}
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:11:9: error: too many arguments to function ‘void hello::world::print()’ print(a); ^ prog.cpp:7:42: note: declared here namespace hello { namespace world { void print() {} } }; ^
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!