rail.cpp: In function 'void findLocation(int, int, int*, int*)':
rail.cpp:41:9: error: found ':' in nested-name-specifier, expected '::'
41 | for(y : lol) {
| ^
| ::
rail.cpp:41:7: error: 'y' has not been declared
41 | for(y : lol) {
| ^
rail.cpp:50:10: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
50 | pos[i] = x;
| ~~~~~~~^~~
rail.cpp:51:16: error: expected ')' before ';' token
51 | tp[i] = k + 1;
| ^
| )
rail.cpp:41:6: note: to match this '('
41 | for(y : lol) {
| ^
rail.cpp:39:18: warning: unused variable 'ls' [-Wunused-variable]
39 | int x = first, ls = 0, k = 0;
| ^~