Blog

Page 405 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for Unnamed/anonymous namespaces vs. static functions
namespaces

Unnamed/anonymous namespaces vs. static functions

Published on September 2, 2023

# Unnamed/anonymous namespaces vs. static functions: Breaking Down the Mystery šŸ•µļøā€ā™€ļø Have you ever stumbled upon the concept of unnamed (anonymous) namespaces while exploring the world of C++ programming? You might have wondered why or when one should us

Cover Image for Parse (split) a string in C++ using string delimiter (standard C++)
parsingsplit

Parse (split) a string in C++ using string delimiter (standard C++)

Published on September 2, 2023

šŸ“ Title: Easy String Parsing in C++: Splitting with a Custom Delimiter Introduction: šŸ‘‹ Hey there, tech enthusiasts! In this blog post, we'll dive into a common issue that many programmers face when attempting to split a string in C++. We'll focus on how

Cover Image for GCC -fPIC option
gcc

GCC -fPIC option

Published on September 2, 2023

# šŸŽÆ GCC -fPIC Option: A Beginner's Guide to Position-Independent Code Have you ever come across the GCC `-fPIC` option and wondered what it does? šŸ¤” Don't worry; you're not alone! In this blog post, we'll break down this commonly confusing piece of jargo

Cover Image for What is the most effective way for float and double comparison?
algorithmfloating-pointoptimization

What is the most effective way for float and double comparison?

Published on September 2, 2023

# Comparing Float and Double Values: The Ultimate Guide 🌟 Hey there, tech enthusiasts! šŸ‘‹ Are you hitting your head against the wall while trying to find the most effective way to compare two `double` or `float` values? šŸ¤” Don't worry, we've got you co

Cover Image for What does int argc, char *argv[] mean?
command-line-argumentsparameters

What does int argc, char *argv[] mean?

Published on September 2, 2023

šŸ–„ļøšŸ’” Understanding int argc, char *argv[] in C++ šŸ’”šŸ–„ļø So, you've probably seen this strange line of code in C++ programs before: `int main(int argc, char *argv[])`. It often pops up in many C++ IDEs and compilers, leaving you wondering what it means and

Cover Image for Why is iostream::eof inside a loop condition (i.e. `while (!stream.eof())`) considered wrong?
iostream

Why is iostream::eof inside a loop condition (i.e. `while (!stream.eof())`) considered wrong?

Published on September 2, 2023

šŸ“ **Title: Why Using iostream::eof in a Loop Condition is Considered Wrong?** **Introduction:** Do you often find yourself using `while (!stream.eof())` when reading data from a file using C++? šŸ“šāœļø It's a common practice, but did you know that it is con

Cover Image for What exactly is nullptr?

What exactly is nullptr?

Published on September 2, 2023

šŸ“šŸ”„ Blog Post: Introducing nullptr - C++11's Superior Null Pointer 🧐 Are you confused by the new C++11 feature called nullptr? šŸ¤” Don't worry, you're not alone! This latest addition to the language can be a bit tricky to grasp, but fear not, we're here

Cover Image for How do I find the length of an array?
arrays

How do I find the length of an array?

Published on September 2, 2023

# How to Find the Length of an Array? šŸ“ Are you struggling to figure out the length of an array? Do you find yourself lost in a maze of code, trying to determine whether you've reached the end of the array or not? Don't worry, my friend! In this blog pos

Cover Image for What are Aggregates and PODs and how/why are they special?
aggregate

What are Aggregates and PODs and how/why are they special?

Published on September 2, 2023

# Aggregates and PODs: Unlocking the Secrets Have you ever come across the terms "Aggregates" and "PODs" while diving deep into the world of C++? šŸ¤” Don't worry! In this blog post, we'll demystify these concepts and uncover why they're so special. Get rea

Cover Image for Are the days of passing const std::string & as a parameter over?

Are the days of passing const std::string & as a parameter over?

Published on September 2, 2023

šŸ“ Are the Days of Passing const std::string & as a Parameter Over? šŸ¤” Have you heard the recent talk by Herb Sutter discussing whether the days of passing `const std::string &` as a parameter are over? šŸŽ™ļø If not, let me bring you up to speed! šŸ‘‰šŸ¼ Dur