Uncategorized

How to use unique_ptr with Arrays in C++?

In Modern C++, we can create unique_ptr object to manage dynamically allocated arrays. However, the syntax for using std::unique_ptr with arrays is a bit different. In this article, we will look into this in more detail. Syntax to use unique_ptr with Arrays When you want a create a unique_ptr object to manage a dynamically allocated …

How to use unique_ptr with Arrays in C++? Read More »

What is the make_unique in C++ & what is its benefit

In this article, we will discuss about the make_unique<>() in C++ and what are its advantages. In the modern C++, memory management has been made significantly easier and safer through smart pointers. The std::make_unique<T>() is a utility function introduced in C++14. It lets the C++ runtime system handle memory allocation without the programmer needing to …

What is the make_unique in C++ & what is its benefit Read More »

Convert timedelta to seconds in Python

This article will discuss how we can convert the datetime module’s timedelta object to total seconds in python. A little insight about the problem in hand, In the datetime module, the datetime.timedelta represents the difference between two dates, time, or datetime objects. For example, we have two timestamps as datetime objects, If you want the …

Convert timedelta to seconds in Python Read More »

Scroll to Top