Blog
Page 661 of my articles, tutorials, and thoughts
Latest Articles
Why should C++ programmers minimize use of "new"?
# Why should C++ programmers minimize use of 'new'? š»šš± So, you stumbled upon this Stack Overflow question about a memory leak with `std::string` when using `std::list<std::string>`. In the comments, someone mentioned that you should "stop using `new`"
How to convert an instance of std::string to lower case
# Converting std::string to Lowercase: A Foolproof Guide āØš Have you ever needed to convert a `std::string` to lowercase but found yourself struggling with the `tolower()` function? š© Well, fret no more! In this guide, we will explore a foolproof soluti
How to trim an std::string?
# How to Trim an `std::string`? š” **Are you tired of dealing with pesky whitespace in your `std::string`?** š© Whether you're a seasoned programmer or just starting out, trimming a string can be a common task. In this guide, we'll explore the best practi
What are the new features in C++17?
š Introducing C++17: Unveiling the Coolest Features! š Hey there, tech fanatics! Get ready to level up your C++ game because C++17 has some awesome new features in store for you. 𤩠In this blog post, we'll dive into the latest additions to the language
What are the rules about using an underscore in a C++ identifier?
š Hey there, fellow tech enthusiasts! š©āš»šØāš» In today's blog post, we're going to address an interesting and commonly asked question in the C++ programming language: what are the rules about using an underscore in a C++ identifier? šš» š¤ So, let'
What does T&& (double ampersand) mean in C++11?
# What Does T&& (Double Ampersand) Mean in C++11? š¤š So, you're diving into the amazing world of C++11 and stumbled upon something that caught your eye - the double ampersand in variable declarations: `T&& var`. š® You might be wondering, what on earth
How to convert a std::string to const char* or char*
## Converting std::string to const char* or char*: A Beginner's Guide Have you ever come across the need to convert an `std::string` to a `const char*` or `char*`? It's a common problem faced by many developers, regardless of their experience level. Thank
What is std::move(), and when should it be used and does it actually move anything?
# Understanding std::move() and Its Impact on Objects šš <p>Have you ever heard of the `std::move()` function and wondered what it does and when to use it? Don't worry, you're not alone! In this blog post, we'll explore the concept of `std::move()` and
Undefined behavior and sequence points
# š§ Understanding Undefined Behavior and Sequence Points Are you puzzled by the terms "undefined behavior" and "sequence points" in the context of programming? š¤ Don't worry, you're not alone! Many developers find these concepts confusing, leading to co
Do the parentheses after the type name make a difference with new?
# Do the parentheses after the type name make a difference with `new`? šš¤ If you've ever written or read code in a C++-like language, chances are you've come across the `new` keyword. It's commonly used to dynamically allocate memory for objects on the







