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.
unnamed

Continue reading

Researcher Claims Samsung’s Tizen OS is Poorly Programmed; Contains 27,000 Bugs!

A researcher has claimed that Samsung’s Tizen operating system that runs on millions of Samsung products is so poorly programmed that it could contain nearly 27,000 programming errors, which could also lead to thousands of vulnerabilities.
image554542

Tizen is a Linux-based open-source operating system backed by Intel and Samsung Electronics, which has been in development since early 2012 and designed for smartphones, tablets, smart TVs, smart watches, cameras and PCs.

Continue reading

The Absolutely True Story of a Real Programmer Who Never Learned C

Says Wil Shipley

I have a young friend named Sam who is quite a programming prodigy. Sam does know C! I need to make this clear: he’s not the titular programmer.

C-Language-Name

But a couple years ago Sam told me a story about a different programmer who never learned C, and I liked it so much that right on the spot I asked his permission to repeat it. (I could never just steal such a tale.)

Continue reading

Grounded Pointers

Once one of our colleagues left the team and joined one company developing software for embedded systems. There is nothing extraordinary about it: in every firm people come and go, all the time. Their choice is determined by bonuses offered, the convenience aspect, and personal preferences. What we find interesting is quite another thing. Our ex-colleague is sincerely worried about the quality of the code he deals with in his new job. And that has resulted in us writing a joint article. You see, once you have figured out what static analysis is all about, you just don’t feel like settling for “simply programming”.

1-main

 

Continue reading

A common error occurring when compiling a 64-bit application: error C2440, OnTimer

One of the most common errors a programmer encounters when porting applications from a Win32 system to a Win64 one is the error related to the function OnTimer. The function OnTimer is used nearly in every application and you are likely to get some compilation errors. Earlier this function had the prototype “OnTimer(UINT nIDEvent)” and is most likely to be present in user classes in the same form. Now this function has the prototype “OnTimer(UINT_PTR nIDEvent)” and it causes a compilation error for the 64-bit system.

Continue reading