In this article we will be discussing the working, syntax and examples of match_results::length() function in C++ STL.What is a match_results in C++ STL?std::match_results is a specialized container-like class which is used to hold the collection of character sequences which are matched. In this container class a regex match operation finds the matches of the target sequence.What is match_results::length()?match_results::length() function is an inbuilt function in C++ STL, which is defined in header file. length() is used to check the length of the n-th match in the match_results object associated with it. length() accepts a parameter which is the match ... Read More
In this article we will be discussing the working, syntax and examples of match_results::empty() function in C++ STL.What is a match_results in C++ STL?std::match_results is a specialized container-like class which is used to hold the collection of character sequences which are matched. In this container class a regex match operation finds the matches of the target sequence.What is match_results::empty()?match_results::empty() function is an inbuilt function in C++ STL, which is defined in header file. empty() checks whether the smatch object which is associated is empty or having some match values in it. empty() returns true if the match object is ... Read More
In this article we will be discussing the working, syntax and examples of match_results::cbegin() and match_results::cend() functions in C++ STL.What is a match_results in C++ STL?std::match_results is a specialized container-like class which is used to hold the collection of character sequences which are matched. In this container class a regex match operation finds the matches of the target sequence.What is match_results::cbegin()?match_results::cbegin() function is an inbuilt function in C++ STL, which is defined in header file. This function returns the constant iterator which is pointing to the first element in the match_results container. Constant iterator can’t be used to do ... Read More
In this article we will be discussing the working, syntax and examples of match_results::begin() and match_results::end() functions in C++ STL.What is a match_results in C++ STL?std::match_results is a specialized container-like class which is used to hold the collection of character sequences which are matched. In this container class a regex match operation finds the matches of the target sequence.What is match_results::begin()?match_results::begin() function is an inbuilt function in C++ STL, which is defined in header file. This function returns an iterator which is pointing to the first element in the match_results object. The match_results::begin() and match_results::end() are together used to ... Read More
In this article we will be discussing the working, syntax and examples of std::is_standard_layout template in C++ STL.is_standard_layout is a template which comes under the header file. This template is used to check whether the given type T is a standard layout or not.What is a standard layout in C++?Standard Layout type is a type in which is of simple linear structure (like we see in array) and access control which can be easily used to communicate with the program written in other programming languages. This is a type which is written with the idea of one code for ... Read More
Given the task is to find the memory range of the different data types, that what range of value a data type can store the value from minimum value to maximum value. There is memory range of data type from in which value of data can be stored. It is difficult to remember the large range of value so C++ has macros for represent these numbers, from macros these large numbers can be directly assigned to variable without typing the whole Number range.Example‘char’(signed) is character data type and has a range of -128 to +128 and macro for minimum value, ... Read More
In this article we will be discussing the working, syntax and examples of tanh() function for a complex number in C++ STL.tanh() for complex number is a function which comes under header file. This function is used to find the hyperbolic tangent of a complex number. This is the complex version of the tanh() which is under the header file.What is tanh?Tanh is the hyperbolic tangent function. To easily define the function, we can say that the tanh is equal to hyperbolic sine divided by hyperbolic cosine.Syntaxcomplex tanh(complex& num);ParametersThe function accepts only one parameter which is num, of ... Read More
In this article we will be discussing the working, syntax and examples of isnormal() function in C++ STL.Isnormal() is a function which comes under the header file. This function is used to check whether the given number is a normal number or not.What is a normal number?A real number is known as a normal number if its base a number is neither zero, infinity, NAN or subnormal.Syntaxbool isnormal(float num);ParametersThe function accepts only one parameter which is num, of float type.Return valueIt returns 0 or 1, if the number is a normal number then the function returns 1 else 0.ExampleInput: ... Read More
In this article we will be discussing the working, syntax and examples of std::is_void template in C++ STL.is_void is a template which comes under the header file. This template is used to check whether the given type T is a void type or not.What is a void type in C++?In simple words void means “empty” or “nothing”. When we declare a function as void then it is assumed that this function will return nothing.We also declare void pointers, which are supposed to left unspecified. However, they must be referenced to another variable of other type, before the pointer is ... Read More
In this article we will be discussing the working, syntax and examples of std::is_unsigned template in C++ STL.is_unsigned is a template which comes under header file. This template is used to check whether the given type T is an unsigned type or not.What are unsigned data types in C++?Unsigned data types are those which we use knowing the values will not go in negative, like roll number, id of random numbers, etc.To make a type as unsigned we use keyword unsigned as prefix of the data type like −unsigned int;unsigned float;Syntaxtemplate is_unsigned;ParametersThe template can have only parameter of type ... Read More