C++ pointers: why we need them, when we use them, how they differ from accessing to object itself

Even though most programmers understand what is the difference between objects and pointers to them, sometimes it is not entirely clear, which of the ways of accessing the object to choose. We have tried to answer this question below.

Continue reading

The long arrow operator in C++

Sometimes, we need to create wrapper types. For example, types like unique_ptrshared_ptroptional and similar.

Usually, these types have an accessor member function called .get but they also provide the operator-> to support direct access to the contained value similarly to what ordinary pointers do.

Continue reading

2038: only 21 years away

Sometimes it seems that things have gone relatively quiet on the year-2038 front. But time keeps moving forward, and the point in early 2038 when 32-bit time_t values can no longer represent times correctly is now less than 21 years away. That may seem like a long time, but the relatively long life cycle of many embedded systems means that some systems deployed today will still be in service when that deadline hits. One of the developers leading the effort to address this problem is Arnd Bergmann; at Linaro Connect 2017 he gave an update on where that work stands.

Picture 1

Continue reading

The Ultimate List of Resources to Learn C and C++

The C programming language was originally developed for and implemented on the UNIX operating system by Dennis Ritchie. C, a quite simple language, is not tied to any particular hardware or system. This makes it easy for a user to write programs that will run without any changes on practically all machines.

Continue reading