Language: C++

#include<bits/stdc++.h>
using namespace std;
void print_err() {
	cerr << "\n";
}
template <class T, class... Arg>
void print_err(T x, Arg&&... args) {
	cerr << x << " ";
	print_err(args...);
}
template<class T>
void print_container(T &cont) {
	for (auto iter : cont) {
		cerr << iter << " ";
	}
	cerr << "\n";
}
#ifdef local
#define debug(...) print_err(_VA_ARGS_)
#define debug_c(container) print_container(container)
#else
#define debug(...)
#define debug_c(container)
#endif
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define mod 1000000007
#define ll long long int
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define pll pair<ll,ll>
#define vl vector<ll>
#define vpll vector<pair<ll,ll>>
#define mll map<ll,ll>
#define mllrev map<ll,ll,greater<int>>
#define ps(x,y) fixed<<setprecision(y)<<x
#define w(t) ll t;cin>>t;while(t--)
#define fo(i,n) for(ll i=0;i<n;++i)
#define foab(i,a,b) for(ll i=a;i<b;++i)
#define inp cin>>
#define pr cout<<
#define all(A) (A).begin(),(A).end()
#define fastio ios_base::sync_with_stdio(NULL);cin.tie(NULL);cout.tie(NULL);
class Graph {
public:
	list<ll> *adj_list;
	ll v;
	Graph(ll v) {
		this->v = v;
		adj_list = new list<ll>[v];
	}
	void add_edge(ll u, ll v, bool bidirectional = true) {
		adj_list[u].push_back(v);
		if (bidirectional) {
			adj_list[v].push_back(u);
		}
	}
	void print();
	void connected_compo();
	void dfs(vector<vector<ll>> vect, ll k1, ll k2, ll n);
	void bfs(ll v, bool visited[]);
};
ll recursive(vector<vector<int>> &vect, vector<vector<int>> &dp, ll n, ll m, ll r, ll c) {
	if (r == 0 and c == 0) {
		return 1;
	}
	if (r < 0 or c < 0) {
		return 0;
	}
	if (vect[r][c] == -1) {
		return 0;
	}
	if (dp[r][c] != -1) {
		return dp[r][c];
	}
	return dp[r][c] = (recursive(vect, dp, n, m, r - 1, c) % mod + recursive(vect, dp, n, m, r, c - 1) % mod) % mod;
}
void solve() {
	ll n, m;
	inp n >> m;
	char ch;
	vector<vector<int>> vect(n, vector<int>(m, 0)), dp(n, vector<int>(m, 0));
	// memset(vect, 0, sizeof(vect));
	memset(dp, -1, sizeof(dp));
	fo(i, n) {
		fo(j, m) {
			inp ch;
			if (ch == '#') {
				vect[i][j] = -1;
			}
		}
	}
	cout << recursive(vect, dp, n, m, n - 1, m - 1) << endl;
	// fo(i, n) {
	// 	fo(j, m) {
	// 		cout << vect[i][j] << " ";
	// 	}
	// 	cout << endl;
	// }
	return;
}
//Rod cutting problem test case
// 5
// 100
// 23 15 50
// 4000
// 3 4 5
// 7
// 5 5 2
// 4
// 2 1 1
// 5
// 5 3 2
int main() {
	fastio
#ifdef local
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	freopen("error.txt", "w", stderr);
#endif
	// w(t) {
	solve();
	// }
	return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:88:16: error: cannot convert 'std::vector<std::vector<int> >' to 'void*'
   88 |         memset(dp, -1, sizeof(dp));
      |                ^~
      |                |
      |                std::vector<std::vector<int> >
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:61:28: note:   initializing argument 1 of 'void* memset(void*, int, size_t)'
   61 | extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));
      |                      ~~~~~~^~~