Problem departure
User ryangohca
Submission Time 2024-02-14 10:58:24
Score 0
Max Time N/A
Max Memory N/A

Compile Error

departure.cpp: In function ‘frac frmin(frac&, frac&)’:
departure.cpp:63:12: error: no match for ‘operator<’ (operand types are ‘frac’ and ‘frac’)
63 | if (f1 < f2) return f1;
| ~~ ^ ~~
| | |
| frac frac
departure.cpp:48:10: note: candidate: ‘bool frac::operator<(frac&&)’ <near match>
48 | bool operator<(frac &&oth){
| ^~~~~~~~
departure.cpp:48:10: note: conversion of argument 1 would be ill-formed:
departure.cpp:63:14: error: cannot bind rvalue reference of type ‘frac&&’ to lvalue of type ‘frac’
63 | if (f1 < f2) return f1;
| ^~
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from departure.cpp:1:
/usr/include/c++/9/bits/regex.h:1048:5: note: candidate: ‘template<class _BiIter> bool std::__cxx11::operator<(const s