#include <iostream>
namespace C{
void Hello(){
std::cout<<"Hello"<<std::endl;
}
extern "C" void HelloThere(){
std::cout<<"Hello There from extern \"C\""<<std::endl;
}
}
extern "C" void HelloThere();
int main() {
C::Hello();
C::HelloThere(); //Compiles
//Hello(); <--- does not compile
HelloThere(); //Also compiles and ptints the same as C::HelloThere() !!!
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKbmFtZXNwYWNlIEN7Cgl2b2lkIEhlbGxvKCl7CgkJc3RkOjpjb3V0PDwiSGVsbG8iPDxzdGQ6OmVuZGw7Cgl9CglleHRlcm4gIkMiIHZvaWQgSGVsbG9UaGVyZSgpewoJCXN0ZDo6Y291dDw8IkhlbGxvIFRoZXJlIGZyb20gZXh0ZXJuIFwiQ1wiIjw8c3RkOjplbmRsOwoJfQp9CgpleHRlcm4gIkMiIHZvaWQgSGVsbG9UaGVyZSgpOwoKaW50IG1haW4oKSB7CglDOjpIZWxsbygpOwoJQzo6SGVsbG9UaGVyZSgpOyAvL0NvbXBpbGVzCgkvL0hlbGxvKCk7IDwtLS0gZG9lcyBub3QgY29tcGlsZQoJSGVsbG9UaGVyZSgpOyAvL0Fsc28gY29tcGlsZXMgYW5kIHB0aW50cyB0aGUgc2FtZSBhcyBDOjpIZWxsb1RoZXJlKCkgISEhCgkKCXJldHVybiAwOwp9Cg==