Posts by HARI HARAN B

Author Biographical Info: Not available

How to get the current date and time in C++ in various formats

By HARI HARAN B

Obtaining the current date and time is crucial in many programs. The C++ STL provides the <chrono> library which can be used with <ctime> from c to get the current time.... Read More

How to loop through elements in unordered map in C++

By HARI HARAN B

std::unordered_map is a hash map implementation provided by the standard template library of C++. It is sometimes necessary to loop through elements of the map. So, in this article.... Read More

How to loop over an array in C++

By HARI HARAN B

Arrays are the most versatile and frequently used data structures that are used to store several values of the same datatype under the same name. This article is about accessing el.... Read More

How to generate random boolean values in C++

By HARI HARAN B

Generating random Boolean values can be achieved by random number-generating algorithms. These values are used in many probability simulations and cryptography algorithms. rand() f.... Read More

How to check if an array is empty or not in C++

By HARI HARAN B

The standard library contains a plethora of powerful containers and the std::array<> is one among them. The array container has several functions and one of them is the empty.... Read More