The ratio_equal() is an inbuilt function in C++ STL that checks if two given ratios are equal or not.
template < class ratio1_name, class ratio2_name > ratio_equal
Template Parameters: The function accepts two template parameters ratio1 and ratio2 which are to be compared.
Return value: The function returns true if the ratios are equal otherwise it returns false.
Below programs illustrate the ratio_equal() function:
Both ratio are equal
Both ratio are not equal
- mbrtoc16() in C/C++ with Examples
- mbrtoc32() in C/C++ with Examples
- set_symmetric_difference in C++ with Examples
- negative_binomial_distribution in C++ with Examples
- std::allocator() in C++ with Examples
- cauchy_distribution a() in C++ with Examples
- feclearexcept in C++ with Examples
- iswgraph() in C/C++ with Examples
- ratio_not_equal() in C++ with examples
- iswprint() in C/C++ with Examples
- SDL library in C/C++ with examples
- memset() in C with examples
- Pointers in C/C++ with Examples
- std::mismatch() with examples in C++
- wmemset() in C/C++ with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.