exit status 1main.cpp: In function ‘int main()’:
main.cpp:25:22: error: template argument 1 is invalid
25 | vector<typename time> timeS(K);
| ^
main.cpp:25:22: error: template argument 2 is invalid
main.cpp:27:17: error: invalid types ‘int[int]’ for array subscript
27 | cin >> timeS[i].second;
| ^
main.cpp:28:10: error: invalid types ‘int[int]’ for array subscript
28 | timeS[i].index = i;
| ^
main.cpp:30:13: error: request for member ‘begin’ in ‘timeS’, which is of non-class type ‘int’
30 | sort(timeS.begin(), timeS.end(), [](time a, time b) {
| ^~~~~
main.cpp:30:28: error: request for member ‘end’ in ‘timeS’, which is of non-class type ‘int’
30 | sort(timeS.begin(), timeS.end(), [](time a, time b) {
| ^~~
main.cpp:30:38: error: ‘time’ is not a type
30 | sort(timeS.begin(), timeS.end(), [](time a, time b) {
| ^~~~
main.cpp:30:46: error: ‘time’ is not a type
30 | sort(timeS.begin(), timeS.end(), [](time a, time b) {
| ^~~~
main.cpp: In lambda function:
main.cpp:31:12: error: request for member ‘second’ in ‘a’, which is of non-class type ‘int’
31 | return a.second < b.second;
| ^~~~~~
main.cpp:31:23: error: request for member ‘second’ in ‘b’, which is of non-class type ‘int’
31 | return a.second < b.second;
| ^~~~~~
main.cpp: In function ‘int main()’:
main.cpp:36:7: error: expected ‘;’ before ‘e’
36 | time e = sogS[i];
| ^~
| ;
main.cpp:37:10: error: ‘e’ was not declared in this scope
37 | while (e.second > length) {
| ^
main.cpp:41:3: error: ‘e’ was not declared in this scope
41 | e.song = song + 1;
| ^
main.cpp:43:13: error: request for member ‘begin’ in ‘timeS’, which is of non-class type ‘int’
43 | sort(timeS.begin(), timeS.end(), [](time a, time b) {
| ^~~~~
main.cpp:43:28: error: request for member ‘end’ in ‘timeS’, which is of non-class type ‘int’
43 | sort(timeS.begin(), timeS.end(), [](time a, time b) {
| ^~~
main.cpp:43:38: error: ‘time’ is not a type
43 | sort(timeS.begin(), timeS.end(), [](time a, time b) {
| ^~~~
main.cpp:43:46: error: ‘time’ is not a type
43 | sort(timeS.begin(), timeS.end(), [](time a, time b) {
| ^~~~
main.cpp: In lambda function:
main.cpp:44:12: error: request for member ‘index’ in ‘a’, which is of non-class type ‘int’
44 | return a.index < b.index;
| ^~~~~
main.cpp:44:22: error: request for member ‘index’ in ‘b’, which is of non-class type ‘int’
44 | return a.index < b.index;
| ^~~~~
main.cpp: In function ‘int main()’:
main.cpp:47:7: error: expected ‘;’ before ‘e’
47 | time e = sogS[i];
| ^~
| ;
main.cpp:48:11: error: ‘e’ was not declared in this scope
48 | cout << e.song << " ";
| ^
Exited with error status 1