Blog

Page 404 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for Why does C++ compilation take so long?
performance

Why does C++ compilation take so long?

Published on September 2, 2023

# Why does C++ compilation take so long? šŸ˜±šŸ’» Have you ever noticed that compiling a C++ file takes an eternity compared to languages like C# and Java? It's like waiting for a sloth to finish its meal! Even a normal-sized Python script runs faster than th

Cover Image for Use "class" or "typename" for template parameters?

Use "class" or "typename" for template parameters?

Published on September 2, 2023

# Class or Typename: Which Should You Use for Template Parameters? šŸ¤” When it comes to defining function templates or class templates in C++, you may have noticed that there are two ways to specify template parameters. You can either use `class` or `typen

Cover Image for How to replace all occurrences of a character in string?
algorithm

How to replace all occurrences of a character in string?

Published on September 2, 2023

## šŸ’” How to Replace All Occurrences of a Character in a String? Replacing all occurrences of a character in a string can be a common task when working with strings in programming. Whether you need to replace a specific character with another character or

Cover Image for Templated check for the existence of a class member function?

Templated check for the existence of a class member function?

Published on September 2, 2023

# 🧐 Templated Check for the Existence of a Class Member Function? Let's Find Out! šŸ•µļøā€ā™€ļø Have you ever wondered if it's possible to write a template that can change its behavior depending on whether a certain member function is defined on a class? šŸ¤” Wel

Cover Image for Is it possible to print a variable"s type in standard C++?
typeofvariables

Is it possible to print a variable"s type in standard C++?

Published on September 2, 2023

# Can You Print a Variable's Type in C++? šŸ¤” Have you ever wondered if it's possible to print the type of a variable in C++? Maybe you find yourself in a situation where you need to debug your code or simply understand the type of a variable during runtim

Cover Image for Does the "mutable" keyword have any purpose other than allowing a data member to be modified by a const member function?
classkeyword

Does the "mutable" keyword have any purpose other than allowing a data member to be modified by a const member function?

Published on September 2, 2023

šŸ“ **Title: The Elusive 'mutable' Keyword: Unveiling its Hidden Powers šŸ¦øā€ā™‚ļø** šŸ‘‹ Hey there, tech enthusiasts! šŸ‘©ā€šŸ’»šŸ‘Øā€šŸ’» Have you ever stumbled upon the mysterious `mutable` keyword in C++ code and wondered: "What's its real purpose?" šŸ¤” Today, we are

Cover Image for How to find if a given key exists in a C++ std::map
dictionary

How to find if a given key exists in a C++ std::map

Published on September 2, 2023

## šŸ—ŗļø Finding a Key in a C++ std::map: A Complete Guide šŸ—ŗļø Have you ever found yourself searching for a specific key in a C++ map and ended up scratching your head? Don't worry, my friend, you're not alone! In this blog post, we'll unravel the mystery a

Cover Image for How to initialize private static members in C++?
initialization

How to initialize private static members in C++?

Published on September 2, 2023

# How to Initialize Private Static Members in C++: Unraveling the Mystery! Is your C++ code displaying weird linker errors when trying to initialize a private static data member? Don't worry, you're not alone! Many developers struggle with this problem. I

Cover Image for How to get current time and date in C++?
datetime

How to get current time and date in C++?

Published on September 2, 2023

šŸ“…šŸ•’šŸ—“ļø**How to Get Current Time and Date in C++: A Complete Guide** šŸ“…šŸ•’šŸ—“ļø Are you a C++ developer searching for a cross-platform solution to get the current date and time in your code? Look no further! In this blog post, we will dive into common issues

Cover Image for How do I declare a 2d array in C++ using new?
arraysmultidimensional-array

How do I declare a 2d array in C++ using new?

Published on September 2, 2023

# How to Declare a 2D Array in C++ Using `new` So, you want to declare a 2D array in C++ using `new`. 😮 Don't worry, you're not alone! Many developers face this same challenge, especially when transitioning from working with "normal" one-dimensional arra