c++ Programming Glossary: they're
How do I get the directory that a program is running from? http://stackoverflow.com/questions/143174/how-do-i-get-the-directory-that-a-program-is-running-from working directory. Please don't suggest libraries unless they're standard ones like clib or STL. If there's no platform filesystem..
Do-While and if-else statements in C/C++ macros http://stackoverflow.com/questions/154136/do-while-and-if-else-statements-in-c-c-macros
Unnamed/anonymous namespaces vs. static functions http://stackoverflow.com/questions/154469/unnamed-anonymous-namespaces-vs-static-functions these unnamed namespaces are accessible within the file they're created in as if you had an implicit using clause to them. My..
C state-machine design http://stackoverflow.com/questions/1647631/c-state-machine-design that unit which is why I used quotes around global above they're more shared than truly global . As with all globals it requires..
How does C compute sin() and other math functions? http://stackoverflow.com/questions/2284860/how-does-c-compute-sin-and-other-math-functions though I think my algorithms are pretty clever obviously they're not . c c math share improve this question In GNU libm..
What are the rules about using an underscore in a C++ identifier? http://stackoverflow.com/questions/228783/what-are-the-rules-about-using-an-underscore-in-a-c-identifier variables with some kind of prefix to denote the fact that they're member variables rather than local variables or parameters...
Undefined, unspecified and implementation-defined behavior http://stackoverflow.com/questions/2397984/undefined-unspecified-and-implementation-defined-behavior you have to read good C books by authors who know what they're talking about. Screw internet tutorials. Screw bullschildt...
Why is volatile not considered useful in multithreaded C or C++ programming? http://stackoverflow.com/questions/2484980/why-is-volatile-not-considered-useful-in-multithreaded-c-or-c-programming volatile memory accesses will occur in the order in which they're specified. That is all we need for what volatile is intended..
C++ Static array vs. Dynamic array? http://stackoverflow.com/questions/2672085/c-static-array-vs-dynamic-array size but you need to allocate and free them yourself since they're not part of the stack frame int foo new int 10 delete foo You..
What do 'statically linked' and 'dynamically linked' mean? http://stackoverflow.com/questions/311882/what-do-statically-linked-and-dynamically-linked-mean that these dynamically linked files are bought in and they're only bought into the in memory copy of the executable not the.. . Since the user typically cannot re link the executable they're stuck with the behaviour of the library. In the dynamic case..
Why does C++ not have reflection? http://stackoverflow.com/questions/359237/why-does-c-not-have-reflection and don't spend time on radical new features unless they're sure it'll pay off. A suggestion for adding a module system.. would have to preserve all the defined classes even if they're not necessary. And then there are templates. Templates in C..
Combining C++ and C - how does #ifdef __cplusplus work? http://stackoverflow.com/questions/3789340/combining-c-and-c-how-does-ifdef-cplusplus-work limitations on what you can do in an extern C block but they're all about linkage. You can't define any new symbols that can't..
When to use virtual destructors? http://stackoverflow.com/questions/461203/when-to-use-virtual-destructors sum up always make base classes' destructors virtual when they're meant to be manipulated polymorphically. If you want to prevent..
Operator Precedence vs Order of Evaluation http://stackoverflow.com/questions/5473107/operator-precedence-vs-order-of-evaluation standard C or C . This can give the false appearance that they're claiming the rules they have decided to apply to their own languages..
What are the barriers to understanding pointers and what can be done to overcome them? http://stackoverflow.com/questions/5727/what-are-the-barriers-to-understanding-pointers-and-what-can-be-done-to-overcome house will have a lower address than the first one. Also they're allocated right next to each other. Thus this code var h1 h2..
Polymorphism in c++ http://stackoverflow.com/questions/5854581/polymorphism-in-c casting coercion are discussed later for completeness as they're commonly intuitively understood anyway warranting a oh that..
C++ obtaining milliseconds time on Linux — clock() doesn't seem to work properly http://stackoverflow.com/questions/588307/c-obtaining-milliseconds-time-on-linux-clock-doesnt-seem-to-work-properl it's not magic there must be something standard that they're using c timer clock share improve this question You could..
Do getters and setters impact performance in C++/D/Java? http://stackoverflow.com/questions/1109995/do-getters-and-setters-impact-performance-in-c-d-java As such I don't think they're a good or bad practice. They're just something you can do if you really want to. share improve..
Fast String Hashing Algorithm with low collision rates with 32 bit integer http://stackoverflow.com/questions/114085/fast-string-hashing-algorithm-with-low-collision-rates-with-32-bit-integer One of the FNV variants should meet your requirements. They're fast and produce fairly evenly distributed outputs. share improve..
When to use dynamic vs. static libraries http://stackoverflow.com/questions/140061/when-to-use-dynamic-vs-static-libraries libraries increase the size of the code in your binary. They're always loaded and whatever version of the code you compiled..
What's the real reason to not use the EOF bit as our stream extraction condition? http://stackoverflow.com/questions/14615671/whats-the-real-reason-to-not-use-the-eof-bit-as-our-stream-extraction-condition occur. However many text editors have a dirty secret. They're lying to you when you save a text file even as simple as that...
Why isn't std::initializer_list a language built-in? http://stackoverflow.com/questions/15198807/why-isnt-stdinitializer-list-a-language-built-in in C between the core language and the standard libraries. They're different chapters in the standard but each references the other..
PHP and C++ for UTF-8 code unit in reverse order in Chinese character http://stackoverflow.com/questions/15972306/php-and-c-for-utf-8-code-unit-in-reverse-order-in-chinese-character php c c utf 8 cjk share improve this question They're both correct. The difference is in endian ness. My guess is..
C++ valarray vs. vector http://stackoverflow.com/questions/1602451/c-valarray-vs-vector valarray vs. vector So I like vectors a lot. They're nifty and fast. But I know this thing called a valarray exists...
What does this C++ code mean? http://stackoverflow.com/questions/1604968/what-does-this-c-code-mean and the 7 are bit sizes to limit the range of the values. They're typically found in structures and unions struct x unsigned char..
Are C++ Templates just Macros in disguise? http://stackoverflow.com/questions/180320/are-c-templates-just-macros-in-disguise my OO design and a nagging thought keeps coming back to me They're just a macros really... You could implement rather UGLY auto_ptrs..
Why does C++ compilation take so long? http://stackoverflow.com/questions/318398/why-does-c-compilation-take-so-long more time but the main offender is probably templates. They're useful and make C a far more powerful language but they also..
C++ Serialization Performance http://stackoverflow.com/questions/321619/c-serialization-performance this question I would strongly suggest protocol buffers. They're incredibly simple to use offer great performance and take care..
C++ class header files organization http://stackoverflow.com/questions/346058/c-class-header-files-organization Resist the temptation to create an everything header. They're always trouble down the road. Put a set of related and interdependent..
Is a string literal in c++ created in static memory? http://stackoverflow.com/questions/349025/is-a-string-literal-in-c-created-in-static-memory stuff which may be marked really read only by the OS . They're also never destroyed until main exits. share improve this answer..
C/C++ Compiler for windows http://stackoverflow.com/questions/397377/c-c-compiler-for-windows this question Check out the MinGW compiler tools . They're free and let you use GCC natively on Windows. From the website..
Beyond Stack Sampling: C++ Profilers http://stackoverflow.com/questions/4394606/beyond-stack-sampling-c-profilers if you'll pardon my punning. Take away Use a profiler. They're good enough for Ritchie Kernighan Bentley and Knuth. I don't..
Handles Comparison: empty classes vs. undefined classes vs. void* http://stackoverflow.com/questions/4525847/handles-comparison-empty-classes-vs-undefined-classes-vs-void There are other two ways to define handles. They're Approach 2 class BOOK no need to define it typedef BOOK PBOOK..
Is it possible to program for Windows Phone 7 in standard C++ only? http://stackoverflow.com/questions/4539876/is-it-possible-to-program-for-windows-phone-7-in-standard-c-only managed. The entirety of Win32 API will not be supported. They're pushing a model with managed UI layer and a native middleware..
Memory allocation in C++ http://stackoverflow.com/questions/4687310/memory-allocation-in-c duration are what silly people call stack objects . They're the ones that you will define inside a function as local variables..
Does it matter where I place the asterisk when declaring pointers in C++? http://stackoverflow.com/questions/5449908/does-it-matter-where-i-place-the-asterisk-when-declaring-pointers-in-c share improve this question There's no difference. They're exactly the same. You can choose to write it however you like...
Why doesn't Java have a copy constructor? http://stackoverflow.com/questions/827785/why-doesnt-java-have-a-copy-constructor constructor share improve this question Java does. They're just not called implicitly like they are in C and I suspect..
|