¡@

Home 

c++ Programming Glossary: summary

In C++ source, what is the effect of extern “C”?

http://stackoverflow.com/questions/1041866/in-c-source-what-is-the-effect-of-extern-c

listed in section 7.5 of the C 03 standard here is a brief summary with emphasis on extern C extern C is a linkage specification..

Is any part of C++ syntax context sensitive? [duplicate]

http://stackoverflow.com/questions/1172939/is-any-part-of-c-syntax-context-sensitive

in Appendix A with this important note emphasis added This summary of C syntax is intended to be an aid to comprehension. It is..

Is C++ context-free or context-sensitive?

http://stackoverflow.com/questions/14589346/is-c-context-free-or-context-sensitive

in Appendix A with this important note emphasis added This summary of C syntax is intended to be an aid to comprehension. It is..

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

to declare BAR as an actual function not a macro. In summary the do ... while is there to work around the shortcomings of..

How come a non-const reference cannot bind to a temporary object?

http://stackoverflow.com/questions/1565600/how-come-a-non-const-reference-cannot-bind-to-a-temporary-object

extra answers will satisfy you. Here is a final attempt summary The C committee decided it doesn't make sense to modify temporaries..

Why does C# not provide the C++ style 'friend' keyword?

http://stackoverflow.com/questions/203616/why-does-c-sharp-not-provide-the-c-style-friend-keyword

book uses it regularly throughout its examples. So in summary why is friend missing from C# and what is the best practice..

How do I guarantee fast shutdown of my win32 app?

http://stackoverflow.com/questions/209086/how-do-i-guarantee-fast-shutdown-of-my-win32-app

your 'all threads please shutdown now' event as well. In summary avoid blocking calls that you can't cancel. If you can't and..

In C++, what is a virtual base class?

http://stackoverflow.com/questions/21558/in-c-what-is-a-virtual-base-class

D d d.Foo no longer ambiguous Hope that helps as a mini summary. For more information have a read of this and this . A good..

Why does this program crash: passing of std::string between DLLs

http://stackoverflow.com/questions/2322095/why-does-this-program-crash-passing-of-stdstring-between-dlls

to memory that was never allocated in the first place. In summary the CRT versions need to match but so do the definitions including..

strptime() equivalent on Windows?

http://stackoverflow.com/questions/321849/strptime-equivalent-on-windows

appear to be available. Open Group description of strptime summary it converts a text string such as MM DD YYYY HH MM SS into a..

When and why will an OS initialise memory to 0xCD, 0xDD, etc. on malloc/free/new/delete?

http://stackoverflow.com/questions/370195/when-and-why-will-an-os-initialise-memory-to-0xcd-0xdd-etc-on-malloc-free-new

memory management share improve this question A quick summary of what Microsoft's compilers use for various bits of unowned..

Generating UML from C++ code?

http://stackoverflow.com/questions/405953/generating-uml-from-c-code

typed containers 2001 http citeseerx.ist.psu.edu viewdoc summary doi 10.1.1.27.9064 Umbrello UML Modeller http uml.sourceforge.net..

C++ memcpy() vs std::copy()

http://stackoverflow.com/questions/4707012/c-memcpy-vs-stdcopy

average increase in speed of std copy over memcpy 0.72 In summary there does not appear to be a performance penalty for using..

In which scenario do I use a particular STL Container?

http://stackoverflow.com/questions/471432/in-which-scenario-do-i-use-a-particular-stl-container

this question This cheat sheet provides a pretty good summary of the different containers. See the flowchart at the bottom..

Iterator invalidation rules

http://stackoverflow.com/questions/6438086/iterator-invalidation-rules

invalidation rules for C containers Preferably in a summary list format. Note This is meant to be an entry to Stack Overflow's..

Random number generation in C++11 , how to generate , how do they work? [closed]

http://stackoverflow.com/questions/7114043/random-number-generation-in-c11-how-to-generate-how-do-they-work

article on TR1 random on codeguru. Wikipedia has a good summary thanks @Justin . In principle each engine should typedef a result_type..

What modern C++ libraries should be in my toolbox? [closed]

http://stackoverflow.com/questions/777764/what-modern-c-libraries-should-be-in-my-toolbox

that make them indispensable See my answer below for a summary. c share improve this question Cross platform libraries..

(c++) The benefits / disadvantages of unity builds?

http://stackoverflow.com/questions/847974/c-the-benefits-disadvantages-of-unity-builds

#include all .cpp files into a single compilation unit The summary seems to be that less I O overhead is the major benefit. See..

writing a matrix into a single txt file with mpi

http://stackoverflow.com/questions/9777828/writing-a-matrix-into-a-single-txt-file-with-mpi

amounts of data should be written as binary with only summary data for humans written as text. Make the stuff the computer..

Most efficient way to erase duplicates and sort a c++ vector?

http://stackoverflow.com/questions/1041620/most-efficient-way-to-erase-duplicates-and-sort-a-c-vector

how these perform as the number of duplicates changes Summary when the number of duplicates is large enough it's actually..

Const correctness for value parameters

http://stackoverflow.com/questions/1724051/const-correctness-for-value-parameters

x 0 i 3 compiles without error i x compile error return i Summary Making value parameters is useful to catch some logic errors...

mixing cout and printf for faster output

http://stackoverflow.com/questions/1924530/mixing-cout-and-printf-for-faster-output

OK like that Update Thanks for all the precious feedbacks. Summary of the answers if you want to avoid tricky solutions just simply..

Use 'class' or 'typename' for template parameters? [duplicate]

http://stackoverflow.com/questions/213121/use-class-or-typename-for-template-parameters

talked about this here . I thought it was interesting. Summary Stroustrup originally used class to specify types in templates..

Examples of good gotos in C or C++

http://stackoverflow.com/questions/245742/examples-of-good-gotos-in-c-or-c

which people voted up because they thought I was joking. Summary label changed from original to make intent even clearer infinite_loop..

Is there a performance difference between i++ and ++i in C++?

http://stackoverflow.com/questions/24901/is-there-a-performance-difference-between-i-and-i-in-c

pre increment share improve this question Executive Summary Use i if you don't have a specific reason to use i . For C the..

Why should I avoid multiple inheritance in C++?

http://stackoverflow.com/questions/406081/why-should-i-avoid-multiple-inheritance-in-c

and it will blow back in the face of the maintainer. Summary Consider composition of features instead of inheritance Be wary..

Stack,Static and Heap in C++

http://stackoverflow.com/questions/408670/stack-static-and-heap-in-c

question was asked but it didn't ask about statics. Summary of what static heap and stack memory are A static variable is..

Does std::list::remove method call destructor of each removed element?

http://stackoverflow.com/questions/4260464/does-stdlistremove-method-call-destructor-of-each-removed-element

The answer is delete p but the runtime doesn't know that. Summary Since the runtime cannot do anything sensible with the pointee..

Operator Precedence vs Order of Evaluation

http://stackoverflow.com/questions/5473107/operator-precedence-vs-order-of-evaluation

result of that comparison to z just as it's supposed to. Summary Order of evaluation is independent of associativity. Precedence.. evaluate z before x or y push z push y push x mul add Summary Order of evaluation is independent of precedence. When if we.. on architectures with which most of us are more familiar. Summary Order of evaluation is independent of apparent dependencies..

What are the differences between pointer variable and reference variable in C++?

http://stackoverflow.com/questions/57483/what-are-the-differences-between-pointer-variable-and-reference-variable-in-c

easier code to read and write But what are the differences Summary from answers and links below A pointer can be re assigned any..

What breaking changes are introduced in C++11?

http://stackoverflow.com/questions/6399615/what-breaking-changes-are-introduced-in-c11

for incompatibilities at appendix C.2 C and ISO C 2003 . Summary paraphrasing the FDIS here to make it better suitable as a SO..

Building multiple executables with similar rules

http://stackoverflow.com/questions/7123431/building-multiple-executables-with-similar-rules

executable identical to the one above same compile flags . Summary Is Scons suitable for capable of this Does Scons work well when..

Windows 7 timing functions - How to use GetSystemTimeAdjustment correctly?

http://stackoverflow.com/questions/7685762/windows-7-timing-functions-how-to-use-getsystemtimeadjustment-correctly

handles resolutions reciprocal value of period . Summary GetSystemTimeAdjustment is not the function to look at. This..

“Undefined reference to” template class constructor

http://stackoverflow.com/questions/8752837/undefined-reference-to-template-class-constructor

But it might slow down the compilation a little. Summary The default answer used by the STL for example and in most of..

Smart Pointers: Or who owns you baby? [closed]

http://stackoverflow.com/questions/94227/smart-pointers-or-who-owns-you-baby

per answer so they can be voted up and down individually Summary Conceptually smart pointers are simple and a naive implementations..

writing robust (color and size invariant) circle detection with opencv (based on Hough transform or other features)

http://stackoverflow.com/questions/9860667/writing-robust-color-and-size-invariant-circle-detection-with-opencv-based-on

to find a way to effectively utilize them in an algorithm. Summary To summarize there are two approaches to improve the accuracy..

Is there a production ready lock-free queue or hash implementation in C++

http://stackoverflow.com/questions/1164023/is-there-a-production-ready-lock-free-queue-or-hash-implementation-in-c

able to compile. A lock free hash would also be welcome. SUMMARY So far i have no positive answer. There is no production ready..

Is there a working C++ refactoring tool?

http://stackoverflow.com/questions/1388469/is-there-a-working-c-refactoring-tool

SlickEdit Eclipse CDT. They all were not at all usable. SUMMARY I took time and evaluated Visual Assist X as well as Refactor..

cudaMemcpy segmentation fault

http://stackoverflow.com/questions/15431365/cudamemcpy-segmentation-fault

19340 by 0x40A6CD main Transport.cu 81 19340 19340 HEAP SUMMARY 19340 in use at exit 2 611 365 bytes in 5 017 blocks 19340 total.. 862 frees 4 332 278 bytes allocated 19340 19340 LEAK SUMMARY 19340 definitely lost 0 bytes in 0 blocks 19340 indirectly lost.. of detected and suppressed errors rerun with v 19340 ERROR SUMMARY 1 errors from 1 contexts suppressed 2 from 2 c cuda segmentation..

Branchless code that maps zero, negative, and positive to 0, 1, 2

http://stackoverflow.com/questions/1610836/branchless-code-that-maps-zero-negative-and-positive-to-0-1-2

0 1 2 Can you come up with a faster one without branches SUMMARY The 10 solutions I benchmarked had similar performance. The..

Implementing B=f(A), with B and A arrays and B already defined

http://stackoverflow.com/questions/16254797/implementing-b-fa-with-b-and-a-arrays-and-b-already-defined

of temporaries but without memory leaks Thank you. EDIT SUMMARY OF THE SOLUTIONS PROVIDED IN THE ANSWERS BELOW Thanks to RiaD..

Why does valgrind say basic SDL program is leaking memory?

http://stackoverflow.com/questions/1997171/why-does-valgrind-say-basic-sdl-program-is-leaking-memory

for copyright info 3271 Command . test 3271 3271 3271 HEAP SUMMARY 3271 in use at exit 91 097 bytes in 1 258 blocks 3271 total.. XGetDefault in usr lib libX11.so.6.2.0 3271 3271 LEAK SUMMARY 3271 definitely lost 38 bytes in 5 blocks 3271 indirectly lost.. of detected and suppressed errors rerun with v 3271 ERROR SUMMARY 4 errors from 4 contexts suppressed 93 from 14 Why is this basic..

A very simple thread pool using pthreads in C++

http://stackoverflow.com/questions/3561095/a-very-simple-thread-pool-using-pthreads-in-c

on task 38 thread 1 worked on task 39 12394 12394 ERROR SUMMARY 7 errors from 4 contexts suppressed 804 from 64 12394 12394.. used_suppression 2 helgrind glibc2X 112 12394 12394 ERROR SUMMARY 7 errors from 4 contexts suppressed 804 from 64 I'm not so confident..

Leak in Exception Code C++

http://stackoverflow.com/questions/4161401/leak-in-exception-code-c

22107 by 0x1000043B4 main in . connect3 22107 22107 LEAK SUMMARY 22107 definitely lost 16 bytes in 1 blocks 22107 indirectly..

valgrind memory leak errors when using pthread_create

http://stackoverflow.com/questions/5610677/valgrind-memory-leak-errors-when-using-pthread-create

i get the following errors description 11784 11784 HEAP SUMMARY 11784 in use at exit 4 952 bytes in 18 blocks 11784 total heap.. a fr 01 vol home stud lim workspace Ex3 l 11784 11784 LEAK SUMMARY 11784 definitely lost 0 bytes in 0 blocks 11784 indirectly lost.. of detected and suppressed errors rerun with v 11784 ERROR SUMMARY 2 errors from 2 contexts suppressed 4 from 4 Every time i call..

In an OpenCV application, how do I identify the source of memory leak and fix it?

http://stackoverflow.com/questions/8585852/in-an-opencv-application-how-do-i-identify-the-source-of-memory-leak-and-fix-it

3573 by 0x4725CC main GibbonMain.cpp 108 3573 3573 LEAK SUMMARY 3573 definitely lost 24 432 bytes in 33 blocks 3573 indirectly.. yes to see where uninitialised values come from 3573 ERROR SUMMARY 336 errors from 318 contexts suppressed 10 from 8 What are some..

What data structure, exactly, are deques in C++?

http://stackoverflow.com/questions/8627373/what-data-structure-exactly-are-deques-in-c

array or is it just implementation dependent UPDATE AND SUMMARY OF ANSWERS It seems the general consensus is that a deque is..

Converting data from glReadPixels() to OpenCV::Mat

http://stackoverflow.com/questions/9097756/converting-data-from-glreadpixels-to-opencvmat

me to convert data from glReadPixels to a OpenCV Mat in C SUMMARY OpenGL frame CV Mat Data from left to right Data from left..