V
vthomasset
Hi,
Sorry for the bad subject, but i couldn't figure a better one.
I would like to understand why a variable declared non static in a
header causes multiple symbol definitions (if included in different
compilation units) while the same declaration in a namespace does not.
Also, what is the correct way to declare a scoped variable in a
header ? Using extern and declaring it in a separate compilation
unit ?
Thank you,
Vincent
Sorry for the bad subject, but i couldn't figure a better one.
I would like to understand why a variable declared non static in a
header causes multiple symbol definitions (if included in different
compilation units) while the same declaration in a namespace does not.
Also, what is the correct way to declare a scoped variable in a
header ? Using extern and declaring it in a separate compilation
unit ?
Thank you,
Vincent