If declaring static variables in a dynamically linkable library is fatal mistake, why does my C++ compiler allow doing it? It won't even produce warnings.
>>1
There are some problems with it, but I don't see how it's any worse than other globals. If the user uses synchronization APIs for truly global storage, it should be fine, as long as the user truly intended to use a global. Another thing worth considering are globals stored in the thread local storage...
Compilers should warn about potential errors, not about general bad coding style.
Writing libraries is not for newbie programmers. It's just like not warning against using namespace std or mixing scanf with cin.
Name:
Anonymous2010-03-30 9:50
>>2
It reads in the fucking project file. Jesus christ damn it how thick are you?
Name:
Anonymous2010-03-30 10:09
>>5
You seem to be confused and not know the difference between a compiler and an IDE.
Name:
Anonymous2010-03-30 10:42
If declaring static variables in a dynamically linkable library is fatal mistake
It is not. Declaring and using static variables in a dynamically linkable library does not crash your program. It is a "mistake" only when some moron has strange ideas about how they should behave, and they don't. Such morons are not the target audience of most C++ compilers.
Name:
Anonymous2010-12-17 1:22
Are you GAY?
Are you a NIGGER?
Are you a GAY NIGGER?
If you answered "Yes" to all of the above questions, then GNAA(GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!