I have a file named test1.cpp
namespace a {
int main1() {
return 3;
}
}
And I have another file test2.cpp
#include <stdio.h>
using a::main1;
int main() {
printf("%d", a::main1());
}
Then I got a compilation error saying 'a' has not been declared with g++. Please help me to find out what I missed here, and normally how to do this.
Thank you.