I'm just wondering how
void test()
{
const static int ABC = 12;
cout << ABC;
}
is different from
void test()
{
const int ABC = 12;
cout << ABC;
}
if this function is repeatedly called while the program is executing? What I mean is, is there any performance difference? Or is there a reason why you should prefer one over the other?