Problem timeexam
User YH
Submission Time 2024-02-05 11:02:58
Score 0
Max Time N/A
Max Memory N/A

Compile Error

timeexam.cpp: In function ‘int main()’:
timeexam.cpp:16:26: error: invalid types ‘int[int]’ for array subscript
16 | hours[0] = (string) n[0];
| ^
timeexam.cpp:17:26: error: invalid types ‘int[int]’ for array subscript
17 | hours[1] = (string) n[1];
| ^
timeexam.cpp:20:23: error: no matching function for call to ‘std::__cxx11::basic_string<char>::basic_string(int&)’
20 | hours[1] = (string) n/60;
| ^
In file included from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from timeexam.cpp:1:
/usr/include/c++/9/bits/basic_string.h:654:2: note: candidat