Monatsarchiv: Dezember 2017

Casting in C++, Part 1

The rules of C++ are designed to guarantee that type errors are impossible. Unfortunately, casts subvert the type system. That can lead to all kinds of trouble. Casting is a fundamental concept but it should be used with caution. A … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

Object orientation in C# and C++

Within this article I want to think about the possible implementations in C# and C++ to fulfill the base concept of object orientation. That’s a difficult task because if you start to think about object orientation and ask yourself what … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

Prefer non-member functions

In C++ you can write a function as member function of a class or as non-member function outside of classes. But which of this both software designs is applicable? Which one do you should prefer? The answer is easy: It … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

Returning handles to private members makes them public

Some key features of object-oriented programming can be brunch together to something I want to call the “black box idea”. An object is a black box offering a public interface. All internal implementations, like state management, data control and resource … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen