background preloader

C++

Facebook Twitter

C++ FAQ. Programming Tutorials: C++ Made Easy and C Made Easy. Welcome! If you're new to C++, I recommend you purchase my ebook, Jumping into C++, a complete step-by-step guide for beginners. If you're looking for free tutorials, learn C++ with our C++ tutorial, starting at C++ Made Easy, Lesson 1 (all lessons) If you want to learn C instead, check out our C tutorial C Made Easy, Lesson 1 (all lessons) Want more advanced material on C, C++ graphics, game programming or algorithms?

C++ Tutorial, C++ Made Easy: Learning to Program in C++ Learn C++ with this tutorial, designed for beginners and containing lots of examples, tips and simple explanations. C Tutorial - C Made Easy This tutorial is based on the above tutorial, but uses only standard C language features. More Advanced C and C++ Language Feature Tutorials [Top] C++11 - the new C++ standard C++11 is the new C++ standard, and it's chock full of goodness for C++ programmers, old and new. C++ Standard Template Library (STL) tutorials Understanding Floating Point Numbers by Jeff Bezanson By Ben Marchant. Linking libstdc++ statically. Linking libstdc++ statically Christopher Baus writes about his problems linking libstdc++ statically. Yes, making C++ binaries that will work properly in different Linux distributions is somewhat painful.

The problem is not so much linking libstdc++ statically – it is just a library, after all – but the runtime support required by C++ code in general, to enable features like RTTI and exception handling. The runtime support code used by different parts of a C++ application needs to be compatible. If one part of the program needs to dynamic_cast or catch objects provided by another, both parts must agree on certain implementation details: how to find vtables, how to unwind the stack, and so on. For C++ and a few other GCC-supported languages with similar features, such details are specified by a C++ ABI. As far as I know C++ ABI changes have been introduced with every major release of GCC (i.e. those with different first or second version number components). What happened here? 1 June, 2005. Itanium C++ ABI. Contents Acknowledgements This document was developed jointly by an informal industry coalition consisting of (in alphabetical order) CodeSourcery, Compaq, EDG, HP, IBM, Intel, Red Hat, and SGI.

Additional contributions were provided by a variety of individuals. Chapter 1: Introduction In this document, we specify the Application Binary Interface for C++ programs, that is, the object code interfaces between user C++ code and the implementation-provided system and libraries. In general, this document is written as a generic specification, to be usable by C++ implementations on a variety of architectures. 1.1 Definitions The descriptions below make use of the following definitions: alignment of a type T (or object X) A value A such that any object X of type T has an address satisfying the constraint that &X modulo A == 0. base class of a class T base object destructor of a class T A function that runs the destructors for non-static data members of T and non-virtual direct base classes of T. thunk.

C++ ABI for the ARM Architecture. Operators in C and C++ When not overloaded, for the operators &&, ||, and , (the comma operator), there is a sequence point after the evaluation of the first operand. C++ also contains the type conversion operators const_cast, static_cast, dynamic_cast, and reinterpret_cast. The formatting of these operators means that their precedence level is unimportant. Table[edit] For the purposes of this table, a, b, and c represent valid values (literals, values from variables, or return value), object names, or lvalues, as appropriate. "Can overload" means that the operator can be overloaded in C++. Arithmetic operators[edit] Comparison operators/relational operators[edit] Logical operators[edit] Bitwise operators[edit] Compound assignment operators[edit] Member and pointer operators[edit] Other operators[edit] Notes: Jump up ^ The modulus operator works just with integer operands, for floating point numbers a library function must be used instead (like fmod).^ Jump up to: a b c d e f g h i j k Requires iso646.h in C.

C++ ABI Summary. C++ Reference.