Posts from C++

Random function in C++ with range

By YANNAM SATYA AMRUTHA

In this article, we’ll talk about a C++ function that is commonly used for gaming and security purposes in order to generate a random number from a specified range. C++ inclu.... Read More

Get name and extension of file from absolute path in C++

By Aakanksha Thakar

In this tutorial will see the C++ code to get the file name and the extension from its absolute path. The file’s absolute path is a path from its root folder. Each folder is .... Read More

How to create a dynamic array in C++

By HARI HARAN B

The normal (static ) arrays have their size initialized in compile time. Although, they are useful in some cases most of the time it is required to initialize arrays size in runtim.... Read More

The new[] operator in C++

By HARI HARAN B

The new[] operator is used to dynamically allocate a required amount of storage in the free store. The dynamically allocated memory has to be deleted properly and the delete operat.... Read More

How to create custom comparator for map in C++

By HARI HARAN B

The std::map sorts the elements based on the key value and this sorting is usually done in descending order for most fundamental datatypes. The key values are compared using the st.... Read More

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

Related Posts