Monatsarchiv: Februar 2018

int * const x; (const pointer vs. const data)

The example within the title shows a typical pointer declaration containing the const keyword: “int * const x;”. If you write or read such a declaration you may be confused and ask yourself whether the pointer or the data is … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

Fast way to return a large object

Within this article I want to think about the question how we can move objects between different scopes without the need of expensive copying and without the need to use an error-prone pointer handling. To analyze this topic, we want … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

Type Safety and Resource Safety in C++

If I should summarize the main advantages of C++ in one short sentence I would say: C++ is a completely type safe and resource safe language without performance loss. The type- and resource safety are two very powerful features if … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

Arrays and inheritance, a source of errors

If you work with arrays of objects and offer some functions to execute on these arrays, it is common to pass an array pointer and the array size as function parameters. Arrays will often hold a huge amount of data. … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen