Problem fractions
User NgMinSong123
Submission Time 2024-07-26 17:52:07
Score 0
Max Time N/A
Max Memory N/A

Compile Error

fractions.cpp: In function ‘int main()’:
fractions.cpp:29:18: error: request for member ‘first’ in ‘arr[i]’, which is of non-class type ‘double [3]’
29 | cout << arr[i].first << " " << arr[i].second << endl;
| ^~~~~
fractions.cpp:29:41: error: request for member ‘second’ in ‘arr[i]’, which is of non-class type ‘double [3]’
29 | cout << arr[i].first << " " << arr[i].second << endl;
| ^~~~~~
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from fractions.cpp:1:
/usr/include/c++/9/bits/stl_algo.h: In instantiation of ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = double (*)[3]; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(double*, double*)>]’:
/usr/inclu