#include <iostream>using namespace std; namespace X{ void func1() { cout << "Hi\n"; }} namespace Y{ X::func1;} int main(){ X::func1(); Y::func1(); return 0;}
Standard input is empty
prog.cpp:11: error: expected constructor, destructor, or type conversion before ‘;’ token prog.cpp: In function ‘int main()’: prog.cpp:17: error: ‘func1’ is not a member of ‘Y’
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!