Quantcast
Channel: The Old New Thing
Viewing all articles
Browse latest Browse all 24428

re: Understanding the classical model for linking, groundwork: The algorithm

$
0
0

I've used __declspec(selectany) many times when I needed a module-wide global var. Easier than having it once in a .h, and actually declared in a .c[pp] (or doing macro-trickery to achieve that). Just need to be careful not to include the .h in multiple modules, since each one will get its own instance of the global var, which may not be what you want.


Viewing all articles
Browse latest Browse all 24428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>