Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LINF = 1e18;

int main(void) {
	cin.tie(0); ios::sync_with_stdio(false);
	ll H,W; cin >> H >> W;
	vector<vector<char>> s(H+2,vector<char>(W+2,’#’));
	int cnt = 0;
	for(int i = 1; i <= H;i++)for(int j = 1; j <= W;j++){
			char c; cin >> c;
			if(c == ‘#’) cnt++;
	}
	int dx[4] = {0,1,0,-1},dy[4] = {1,0,-1,0};
	vector<vector<int>> dist(H+2,vector<int>(W+2,INF));
	dist[1][1] = 0;
	queue<pii> q; q.push({1,1});
	while(q.size()){
		auto p = q.front(); q.pop();
		int x = p.first,y = p.second;
		for(int k = 0; k < 4;k++){
			int nx = x + dx[k],ny = y + dy[k];
			if(s[nx][ny] == ‘#’) continue;
			if(dist[nx][ny] > dist[x][y] + 1){
				dist[nx][ny] = dist[x][y] + 1;
				q.push({nx,ny});
			}
		}
	}
	cout << H*W - dist[H][W] - 1 << endl;
	return 0;
}

Compiler output:
a.cc:12:53: error: extended character ’ is not valid in an identifier
   12 |         vector<vector<char>> s(H+2,vector<char>(W+2,’#’));
      |                                                     ^
a.cc:12:54: error: stray '#' in program
   12 |         vector<vector<char>> s(H+2,vector<char>(W+2,’#’));
      |                                                      ^
a.cc:12:55: error: extended character ’ is not valid in an identifier
   12 |         vector<vector<char>> s(H+2,vector<char>(W+2,’#’));
      |                                                       ^
a.cc:16:33: error: extended character ‘ is not valid in an identifier
   16 |                         if(c == ‘#’) cnt++;
      |                                 ^
a.cc:16:34: error: stray '#' in program
   16 |                         if(c == ‘#’) cnt++;
      |                                  ^
a.cc:16:35: error: extended character ’ is not valid in an identifier
   16 |                         if(c == ‘#’) cnt++;
      |                                   ^
a.cc:27:41: error: extended character ‘ is not valid in an identifier
   27 |                         if(s[nx][ny] == ‘#’) continue;
      |                                         ^
a.cc:27:42: error: stray '#' in program
   27 |                         if(s[nx][ny] == ‘#’) continue;
      |                                          ^
a.cc:27:43: error: extended character ’ is not valid in an identifier
   27 |                         if(s[nx][ny] == ‘#’) continue;
      |                                           ^
a.cc: In function 'int main()':
a.cc:12:53: error: '\U00002019' was not declared in this scope
   12 |         vector<vector<char>> s(H+2,vector<char>(W+2,’#’));
      |                                                     ^
a.cc:16:33: error: '\U00002018' was not declared in this scope
   16 |                         if(c == ‘#’) cnt++;
      |                                 ^
a.cc:16:34: error: expected ')' before '\U00002019'
   16 |                         if(c == ‘#’) cnt++;
      |                           ~      ^~
      |                                  )
a.cc:27:41: error: '\U00002018' was not declared in this scope
   27 |                         if(s[nx][ny] == ‘#’) continue;
      |                                         ^
a.cc:27:42: error: expected ')' before '\U00002019'
   27 |                         if(s[nx][ny] == ‘#’) continue;
      |                           ~              ^~
      |                                          )