HI,
i have small doubt related to the accessibility of variables.
int i; //default the linkage is external
const int i; //default linkage is internal
extern int i; //explicitly assigning linkage as external
class a
{
int l; //Default linkage is external
void f()
{
int k; //default linkage is external
}
}
this link says default linkage is extern for non-const symbols and static (internal) for const symbols.
what about int i
is it accessible in other file with out having external keyword?
what about the variable present inside the class and functions?
How to aces the function present in anonymous name space & what linkage do they have?
namespace //members of anonymous namespace
{
class C{};
int x;
}