lvalue vs. rvalue An lvalue is usually on the left side of an assignment and is addressable in the memory.
Continue readingCategory: Programming
Single vs. double quotes (C++ / PS)
C++ char c = ‘a’; // Character char* s = “abc\ndef”; // Null-terminated C-string PS > $a = 42 >
Continue readingDeleter – std::shared_ptr vs. std::unique_ptr
For the std::unique_ptr the deleter is part of the type and the std::shared_ptr keeps it as part of its control
Continue readingTypes of mutexes and locks (C++)
Mutexes (Selection) … synchronizes the access on critical sections std::mutex Provides exclusive access (can only be pulled by one thread
Continue readingNull-terminated strings (C++)
If you are working with strings you have two basic ways to define its length. Either you write a specific
Continue readingActive vs. passive waiting (C++)
Active waiting Don’t use this approach, cause it will unnecessarily consume CPU time. The sleep reduces the CPU consumption, but
Continue readingThe Pitchfork Layout (C++)
I recently stumbled over ‘The Pitchfork Layout‘ and I know there are so many ways to order your project files,
Continue readingDeclaration specifiers (C++)
The following list is just a selection. Specifier Variable Function const Can’t be modified.1 Method: Can’t modify its fields.1 constexp
Continue readingPosition of Ptr. / Ref. (C++)
There are two common ways for the position of the pointer sign (*) or the reference sign (&). C-Style ClassA
Continue reading