The ratio_not_equal is an inbuilt function in C++ STL that checks if two given ratios are not equal or equal.
template < class ratio1_name, class ratio2_name > ratio_not_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 not equal otherwise it returns false.
Program below demonstrates the function:
Both ratio are equal
Both ratio are not equal
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- std::less in C++ with Examples
- Pi(π) in C++ with Examples
- cin get() in C++ with Examples
- Manipulators in C++ with Examples
- C/C++ if else statement with Examples
- iswprint() in C/C++ with Examples
- negative_binomial_distribution in C++ with Examples
- mbrtoc32() in C/C++ with Examples
- mbrtoc16() in C/C++ with Examples
- wmemset() in C/C++ with Examples
- iswgraph() in C/C++ with Examples
- ios bad() function in C++ with Examples
- ratio_equal() in C++ with examples
- ios eof() function in C++ with Examples
- std::add_cv in C++ with Examples
- std::equal_to in C++ with Examples
- std::is_move_assignable C++ with Examples
- std::is_member_pointer in C++ with Examples
- std::is_nothrow_copy_assignable in C++ with Examples
- std::is_move_constructible in 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 firstname.lastname@example.org. 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.