Globals and Unnamed Namespaces | Sololearn: Learn to code for FREE!
+ 8

Globals and Unnamed Namespaces

I have seen a few examples of people putting globals inside unnamed namespaces. i.e namespace { const int myGlobal = 4; } what is the purpose of using a blank namespace. Shouldnt we be using a named namespace?

18th Jul 2017, 2:10 AM
jay
jay - avatar
1 Answer
+ 10
..... google to the rescue! lol.. Replacement for static.. 😊 sorry for the disturbance folks.. back to it! http://www.comeaucomputing.com/techtalk/#nostatic
18th Jul 2017, 2:18 AM
jay
jay - avatar