Re:Show HN: Buckaroo – A decentralized C++ package manager
by c-smile on Friday February 01, 2019 @05:28PM
(#19059381)
In C/C++ static declarations are local to the compilation unit. So you will have two separate storages for foo - these will be two independent variables.
That's how C and C++ work.
And if you will have this (no static):
int foo = 45;
then linker will complain - "multiple 'foo' entities" as non-static entities have global visibility.
That's how C and C++ work.
And if you will have this (no static):
then linker will complain - "multiple 'foo' entities" as non-static entities have global visibility.