Can someone explain why does the code below give a compilation error? Revising for a test. Thanks
1 2 3 4 5 6 7 8 9 10 11 12 13 14
What is the output of the following code?
#include <iostream>
namespace first {
int var = 5;
}
namespace {
double var = 3.1416;
}
int main(void) {
usingnamespace first;
std::cout << var;
return 0;
}
Compilation error