Problem departure
User ryangohca
Submission Time 2024-02-14 12:52:39
Score 0
Max Time N/A
Max Memory N/A

Compile Error

departure.cpp: In function ‘frac frmin(frac&, frac&)’:
departure.cpp:73:12: error: no match for ‘operator<’ (operand types are ‘frac’ and ‘frac’)
73 | if (f1 < f2) return f1;
| ~~ ^ ~~
| | |
| frac frac
departure.cpp:58:10: note: candidate: ‘bool frac::operator<(frac&&)’ <near match>
58 | bool operator<(frac &&oth){
| ^~~~~~~~
departure.cpp:58:10: note: conversion of argument 1 would be ill-formed:
departure.cpp:73:14: error: cannot bind rvalue reference of type ‘frac&&’ to lvalue of type ‘frac’
73 | 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