Problem trains
User justin271828
Submission Time 2023-06-19 13:46:49
Score 0
Max Time N/A
Max Memory N/A

Compile Error

trains.cpp:4:40: error: expected identifier before ‘)’ token
4 | int calctotal(int x, int *dup_K, int L,) {//array index
| ^
trains.cpp: In function ‘int calctotal(int, int*, int, int)’:
trains.cpp:16:9: error: ‘total’ was not declared in this scope
16 | return total;
| ^~~~~
trains.cpp: In function ‘int main()’:
trains.cpp:32:31: error: too few arguments to function ‘int calctotal(int, int*, int, int)’
32 | cout << calctotal(0, dup_K, l);
| ^
trains.cpp:4:5: note: declared here
4 | int calctotal(int x, int *dup_K, int L,) {//array index
| ^~~~~~~~~