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:17:33: error: extended character ‘ is not valid in an identifier
   17 |                         if(c == ‘#’) cnt++;
      |                                 ^
a.cc:17:34: error: stray '#' in program
   17 |                         if(c == ‘#’) cnt++;
      |                                  ^
a.cc:17:35: error: extended character ’ is not valid in an identifier
   17 |                         if(c == ‘#’) cnt++;
      |                                   ^
a.cc:29:41: error: extended character ‘ is not valid in an identifier
   29 |                         if(s[nx][ny] == ‘#’) continue;
      |                                         ^
a.cc:29:42: error: stray '#' in program
   29 |                         if(s[nx][ny] == ‘#’) continue;
      |                                          ^
a.cc:29:43: error: extended character ’ is not valid in an identifier
   29 |                         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:17:33: error: '\U00002018' was not declared in this scope
   17 |                         if(c == ‘#’) cnt++;
      |                                 ^
a.cc:17:34: error: expected ')' before '\U00002019'
   17 |                         if(c == ‘#’) cnt++;
      |                           ~      ^~
      |                                  )
a.cc:29:41: error: '\U00002018' was not declared in this scope
   29 |                         if(s[nx][ny] == ‘#’) continue;
      |                                         ^
a.cc:29:42: error: expected ')' before '\U00002019'
   29 |                         if(s[nx][ny] == ‘#’) continue;
      |                           ~              ^~
      |                                          )