Blog

Page 401 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for Why do we use the volatile keyword?

Why do we use the volatile keyword?

Published on September 2, 2023

## 🌟 Unlocking the Mysteries of the Volatile Keyword 🌟 Have you ever come across the "volatile" keyword in your code and wondered what it does and why people use it? šŸ¤” Well, you're not alone! This little keyword has sparked curiosity and confusion amon

Cover Image for What uses are there for "placement new"?
memory-management

What uses are there for "placement new"?

Published on September 2, 2023

# Unleashing the Magic of "Placement New" in C++ šŸŽ©āœØ Hey there, tech enthusiasts! Today we're going to explore the enchanting world of "placement new" šŸŖ„āœØ in C++. šŸ–„ļø ## What the heck is "placement new" anyway? šŸ¤” If you've ever wondered why you would n

Cover Image for What is the meaning of prepended double colon "::"?
namespacessyntax

What is the meaning of prepended double colon "::"?

Published on September 2, 2023

# What is the meaning of prepended double colon "::"? If you've stumbled upon code snippets with a mysterious prepended double colon (::), fear not! You're not alone in your confusion. In this blog post, we'll unravel the meaning behind this perplexing sy

Cover Image for How do I use arrays in C++?
arraysmultidimensional-array

How do I use arrays in C++?

Published on September 2, 2023

šŸ“ **Title:** A Beginner's Guide to Using Arrays in C++: Demystifying the Basics šŸ“Œ **Introduction:** Are you new to C++ and feeling overwhelmed by the concept of arrays? You're not alone! Even though arrays are a fundamental data structure in C++, they c

Cover Image for C++11 rvalues and move semantics confusion (return statement)

C++11 rvalues and move semantics confusion (return statement)

Published on September 2, 2023

# Understanding C++11 Rvalues and Move Semantics with Return Statements ## Introduction Are you struggling to understand rvalue references and move semantics in C++11? You're not alone! These concepts can be confusing, but fear not, we're here to help yo

Cover Image for What are copy elision and return value optimization?
optimization

What are copy elision and return value optimization?

Published on September 2, 2023

# The Ultimate Guide to Copy Elision and Return Value Optimization šŸ˜ŽšŸ”„ ## Introduction So, you've stumbled upon the fascinating world of copy elision and return value optimization. 🌟 But what exactly are these terms, and what do they imply? šŸ¤” Don't wo

Cover Image for How does the compilation/linking process work?

How does the compilation/linking process work?

Published on September 2, 2023

šŸ“ **Blog Post: How Does the Compilation/Linking Process Work?** Hey there tech enthusiasts! šŸ‘‹ Have you ever wondered how your code magically transforms into an executable program? šŸ¤” Today, we're diving into the fascinating world of compilation and link

Cover Image for Is there any advantage of using map over unordered_map in case of trivial keys?
dictionaryperformance

Is there any advantage of using map over unordered_map in case of trivial keys?

Published on September 2, 2023

šŸ“ **Blog Post**: Map vs Unordered_map: Which One Is Better for Trivial Keys? šŸ“Ž **Introduction** Are you confused about whether to use `map` or `unordered_map` in C++ when dealing with trivial keys like `int` or `std::string`? Look no further! In this a

Cover Image for Use of "const" for function parameters

Use of "const" for function parameters

Published on September 2, 2023

## The Power of `const` for Function Parameters šŸ’Ŗ Have you ever wondered about the `const` keyword in function parameters? šŸ¤” Should you use it sparingly or go all-in and use it everywhere? šŸ¤·ā€ā™‚ļø Let's dive into this topic and explore the benefits, commo

Cover Image for Undefined reference to vtable
gcc

Undefined reference to vtable

Published on September 2, 2023

# 🚧 Fixing the "Undefined reference to vtable" error šŸ› ļø <p>So you're building your C++ program, and suddenly you encounter the dreaded error message:</p> <blockquote> <p>undefined reference to 'vtable...</p> </blockquote> <p>You're probably wonderin