¡@

Home 

c++ Programming Glossary: about

What is a smart pointer and when should I use one?

http://stackoverflow.com/questions/106508/what-is-a-smart-pointer-and-when-should-i-use-one

have to create the object but you no longer have to worry about destroying it. SomeSmartPtr MyObject ptr new MyObject ptr DoSomething..

What is the difference between a definition and a declaration?

http://stackoverflow.com/questions/1410563/what-is-the-difference-between-a-definition-and-a-declaration

doesn't know what to link references to and complains about a missing symbols. If you define something more than once then.. of the definitions to link references to and complains about duplicated symbols. Since the debate what is a class declaration..

What is this weird colon-member syntax in the constructor?

http://stackoverflow.com/questions/1711990/what-is-this-weird-colon-member-syntax-in-the-constructor

a member initialization list . You should find information about it in any good C book. You should in most cases initialize all..

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

are the rules about using an underscore in a C identifier It's common in C to name.. '_t' as this is reserved by the POSIX standard. The rule about any identifier ending with '_t' surprised me a lot. I think..

Undefined, unspecified and implementation-defined behavior

http://stackoverflow.com/questions/2397984/undefined-unspecified-and-implementation-defined-behavior

read good C books by authors who know what they're talking about. Screw internet tutorials. Screw bullschildt. share improve..

What is the slicing problem in C++?

http://stackoverflow.com/questions/274626/what-is-the-slicing-problem-in-c

What is move semantics?

http://stackoverflow.com/questions/3106110/what-is-move-semantics

new features made sense to me and I am actually excited about C 0x now with the exception of one. I still don't get move semantics..

What is the copy-and-swap idiom?

http://stackoverflow.com/questions/3279543/what-is-the-copy-and-swap-idiom

assignments. And that is the copy and swap idiom. What about C 11 The next version of C C 11 makes one very important change..

What can I use to profile C++ code in Linux?

http://stackoverflow.com/questions/375913/what-can-i-use-to-profile-c-code-in-linux

and it comes up heads both times what does that tell you about the probable weighting of the coin The respected way to answer.. So even a very small number of samples can tell us a lot about the cost of instructions that it sees. And it will see them..

What are Aggregates and PODs and how/why are they special?

http://stackoverflow.com/questions/4178175/what-are-aggregates-and-pods-and-how-why-are-they-special

and PODs and how why are they special This FAQ is about Aggregates and PODs and covers the following material What are.. to read This article is rather long. If you want to know about both aggregates and POD's Plain Old Data take time and read.. can also be an aggregate if&hellip wait nothing is said about structs or unions can't they be aggregates Yes they can. In..

Operator overloading

http://stackoverflow.com/questions/4421706/operator-overloading

surprisingly. Assignment Operator There's a lot to be said about assignment. However most of it has already been said in GMan's..

When to use forward declaration?

http://stackoverflow.com/questions/553682/when-to-use-forward-declaration

compiler knows is that this type exists it knows nothing about its size members or methods. This is why it's called an incomplete..

Can a local variable's memory be accessed outside its scope?

http://stackoverflow.com/questions/6441218/can-a-local-variables-memory-be-accessed-outside-its-scope

it with a wardrobe. The entire hotel could be just about to be torn down and replaced with a football stadium and you.. number higher than you has checked out. So let's think about the stack. In many operating systems you get one stack per thread..

Should I use double or float?

http://stackoverflow.com/questions/1074474/should-i-use-double-or-float

you should read What Every Computer Scientist Should Know About Floating Point Arithmetic . In short although double give higher..

C++: do you (really) write exception safe code? [closed]

http://stackoverflow.com/questions/1853243/c-do-you-really-write-exception-safe-code

. So as far as I see it it is worth it. Edit 2010 01 29 About non throwing swap nobar made a comment that I believe is quite..

When to use inline function and when not to use it?

http://stackoverflow.com/questions/1932311/when-to-use-inline-function-and-when-not-to-use-it

apart maybe when writing very very small functions . About performance the wise approach is as always to profile the application..

Does the restrict keyword provide significant benefits in gcc / g++

http://stackoverflow.com/questions/1965487/does-the-restrict-keyword-provide-significant-benefits-in-gcc-g

Most of the time the difference is not that large though. About 10 . Here is a little example that illustrate the difference...

Interpretation of int (*a)[3]

http://stackoverflow.com/questions/2250397/interpretation-of-int-a3

and pointers for a really good tutorial on this topic. About reading declarations in general you read them inside out starting..

Why was std::strstream deprecated?

http://stackoverflow.com/questions/2820221/why-was-stdstrstream-deprecated

it or call free on it or do something else entirely. About the only really satisfactory way to deallocate it was to hand..

Portable C++ build system

http://stackoverflow.com/questions/3349956/portable-c-build-system

and happy with MinGW... take a look on autotools as well. About Scons it is still less mature them CMake. share improve this..

Determining the alignment of C/C++ structures in relation to its members

http://stackoverflow.com/questions/364483/determining-the-alignment-of-c-c-structures-in-relation-to-its-members

of the structure in What Every Programmer Should Know About Memory but I couldn't find anything remotely similar in the..

Structure of a C++ Object in Memory Vs a Struct

http://stackoverflow.com/questions/422830/structure-of-a-c-object-in-memory-vs-a-struct

It has no virtual functions It has no base classes About the only C isms allowed are non virtual member functions static..

float bits and strict aliasing

http://stackoverflow.com/questions/4328342/float-bits-and-strict-aliasing

aliasing type punning share improve this question About the only way to truly avoid any issues is to memcpy. unsigned..

about “int const *p” and “const int *p ”

http://stackoverflow.com/questions/5268521/about-int-const-p-and-const-int-p

can be changed am i right Why the p2 &i2 can be compiled About this line const int const p3 &i1 p3 &i2 Oh god... I am crazy...

What is the best way to learn C++ if I have a bit of other programming experience?

http://stackoverflow.com/questions/554847/what-is-the-best-way-to-learn-c-if-i-have-a-bit-of-other-programming-experienc

takes five years. I'm not expecting 24 hours or 30 days. About me I don't have a CS degree I have an anthropology degree and..

Callback functions in C/C++/C# [closed]

http://stackoverflow.com/questions/6183847/callback-functions-in-c-c-c

information about Callback Functions such as Articles About Callback Function. Examples of use. Code parts. I think this..

ifstream not reading EOF character

http://stackoverflow.com/questions/6512173/ifstream-not-reading-eof-character

input.c_str getline curfile line int linenumber 0 cout About to try to read the file endl if curfile.good cout Bad file read.. pos 0 int linenumber 0 ifstream curfile input.c_str cout About to try to read the file endl while getline curfile line cout..

Returning Large Objects in Functions

http://stackoverflow.com/questions/753312/returning-large-objects-in-functions

clear if there are any preconditions on the passed object. About the copies. The code you posted is not using the assignment..

Why doesn't java have pointers? [closed]

http://stackoverflow.com/questions/8080617/why-doesnt-java-have-pointers

options most of which can be done better in idiomatic C . About the only real use for pointers is direct memory manipulation...

Need for predictable random generator

http://stackoverflow.com/questions/910215/need-for-predictable-random-generator

produced results that were out of those bounds . About 11 of the time 0 critical hits were scored in 10 tries. 3.3..

What XML parser should I use in C++?

http://stackoverflow.com/questions/9387610/what-xml-parser-should-i-use-in-c

dependencies. It uses the Apache license. I Don't Care About DOM and or SAX Conformance You have chosen LibXML2 LibXML2 offers.. It is a header only library with no dependencies. I Care About Performance But Not Quite That Much Yes performance matters..