Tag Archives: cpp-advanced

C++ 17 introduced many new ways to declare a variable. Earlier assignment and declaration was done using “=” Example: int a = 5; But now… Read More
Declaration of a variable is for informing to the compiler the following information: name of the variable, type of value it holds and the initial… Read More
any is one of the newest features of C++17 that provides a type-safe container to store single value of any type. In layman’s terms, it… Read More
A Cast operator is an unary operator which forces one data type to be converted into another data type. C++ supports four types of casting:… Read More
A Vector Quantity is a Quantity which possesses both magnitude as well as direction. Here, magnitude is simply the amount or size of the quantity… Read More
Create a function that prints multidimensional array size by dimenstions i.e.: Examples: Input : int a[2][3][4]; printDimensions(a); Output : 2x3x4 Input : int b[5][6]; printDimensions(a);… Read More
Defaulted Function What is a Defaulted Function? Explicitly defaulted function declaration is a new form of function declaration that is introduced into the C++11 standard… Read More
Prerequisite : Tuples in C++ Structured binding is one of the newest features of C++17 that binds the specified names to subobjects or elements of… Read More
reinterpret_cast is a type of casting operator used in C++. It is used to convert one pointer of another pointer of any type, no matter… Read More
In many cases, we need to check the value of something returned by a function and perform conditional operations based on this value. So our… Read More
Iterators in C++ STL | Introduction Functions Iterator operations : std :: advance : Advance iterator std :: distance : Return distance between iterators std ::… Read More
Non-modifying sequence operations  std :: all_of  : Test condition on all elements in range std :: any_of  : Test if any element in range fulfills… Read More
Vectors are same as dynamic arrays with the ability to resize itself automatically when an element is inserted or deleted, with their storage being handled… Read More
Lambda expressions were introduced in C++11. They are basically snippets of code that can be nested inside other functions and even function call statements. By… Read More