Problem inheritance
User AshwinJoy
Submission Time 2026-09-19 16:24:02
Score 0
Max Time N/A
Max Memory N/A

Compile Error

inheritance.cpp: In function ‘int main()’:
inheritance.cpp:106:24: error: ‘A’ was not declared in this scope
106 | if(isConnected(mid, A, B)){
| ^
inheritance.cpp:106:27: error: ‘B’ was not declared in this scope
106 | if(isConnected(mid, A, B)){
| ^
inheritance.cpp:114:24: error: ‘A’ was not declared in this scope
114 | if(isConnected(left, A, B)){
| ^
inheritance.cpp:114:27: error: ‘B’ was not declared in this scope
114 | if(isConnected(left, A, B)){
| ^
inheritance.cpp:115:17: error: invalid types ‘int [(M + 1)][<unresolved overloaded function type>]’ for array subscript
115 | railway[index] = 0;
| ^
inheritance.cpp:119:17: error: invalid types ‘int [(M + 1)][<unresolved overloaded function type>]’ for array subscript
119 | railway[index] = left;