Problem collectmushrooms6
User thelusidian
Submission Time 2025-02-05 13:59:41
Score 0
Max Time N/A
Max Memory N/A

Compile Error

collectmushrooms6.cpp: In function ‘int main()’:
collectmushrooms6.cpp:28:15: error: ‘else’ without a previous ‘if’
28 | } else if (map[i][j] = 'M'){
| ^~~~
collectmushrooms6.cpp:28:31: error: ‘j’ was not declared in this scope
28 | } else if (map[i][j] = 'M'){
| ^
collectmushrooms6.cpp:29:30: error: no matching function for call to ‘std::vector<std::pair<int, int> >::push_back(<brace-enclosed initializer list>)’
29 | mushrooms.push_back({i,j});
| ^
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/functional:62,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from collectmushrooms6.cpp: