Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<queue>

using namespace std;

int H, W;
vector<vector<char>> s(H, vector<char>(W));
bool flag = true;

int a(4) = { 0, 1, 0, -1}
int	b(4) = { 1, 0, -1, 0}

int lake(int A, B,C){
	if (A < 0 || A >= H || B < 0 || B >= H) {
		return 0;
	}
	else if (C == 0) {
		for (int i = 0; i < 4; i++) {
			if (!(lake(A + a[i], B + b[i], C+1))) return flag = false;
		}
	}
	if (s.[A][B] =='#') {
		del(A, B);
		for (int i = 0; i < 4; i++) {
			lake(A + a[i], B + b[i],C+1);
		}
	}
}

int del(int i, int j) {
	s[i][j] = '.';
}

int main() {
	cin >> H>> W;
	for (int i = 0; i < H; i++) {
		for (int j = 0; j < W; j++) {
			cin >> s[i][j];
		}
	}
	for (int i = 0; i < H; i++) {
		for (int j = 0; j < W; j++) {
			if (s.[i][j] == '#') lake(i, j, 0);
		}
	}
	if (flag) cout << "Yes" << endl;
	else cout << "No" << endl;
}

Compiler output:
a.cc:12:10: error: expected ',' or ';' before '=' token
   12 | int a(4) = { 0, 1, 0, -1}
      |          ^
a.cc:13:14: error: expected ',' or ';' before '=' token
   13 | int     b(4) = { 1, 0, -1, 0}
      |              ^
a.cc:15:17: error: 'B' has not been declared
   15 | int lake(int A, B,C){
      |                 ^
a.cc:15:19: error: 'C' has not been declared
   15 | int lake(int A, B,C){
      |                   ^
a.cc: In function 'int lake(int, int, int)':
a.cc:16:32: error: 'B' was not declared in this scope
   16 |         if (A < 0 || A >= H || B < 0 || B >= H) {
      |                                ^
a.cc:19:18: error: 'C' was not declared in this scope
   19 |         else if (C == 0) {
      |                  ^
a.cc:21:41: error: invalid types 'int[int]' for array subscript
   21 |                         if (!(lake(A + a[i], B + b[i], C+1))) return flag = false;
      |                                         ^
a.cc:21:51: error: invalid types 'int[int]' for array subscript
   21 |                         if (!(lake(A + a[i], B + b[i], C+1))) return flag = false;
      |                                                   ^
a.cc:24:15: error: expected unqualified-id before '[' token
   24 |         if (s.[A][B] =='#') {
      |               ^
a.cc:24:19: error: 'B' was not declared in this scope
   24 |         if (s.[A][B] =='#') {
      |                   ^
a.cc:25:17: error: 'del' was not declared in this scope
   25 |                 del(A, B);
      |                 ^~~
a.cc:27:35: error: invalid types 'int[int]' for array subscript
   27 |                         lake(A + a[i], B + b[i],C+1);
      |                                   ^
a.cc:27:45: error: invalid types 'int[int]' for array subscript
   27 |                         lake(A + a[i], B + b[i],C+1);
      |                                             ^
a.cc:27:49: error: 'C' was not declared in this scope
   27 |                         lake(A + a[i], B + b[i],C+1);
      |                                                 ^
a.cc: In function 'int del(int, int)':
a.cc:34:1: warning: no return statement in function returning non-void [-Wreturn-type]
   34 | }
      | ^
a.cc: In function 'int main()':
a.cc:45:31: error: expected unqualified-id before '[' token
   45 |                         if (s.[i][j] == '#') lake(i, j, 0);
      |                               ^
a.cc: In function 'int lake(int, int, int)':
a.cc:30:1: warning: control reaches end of non-void function [-Wreturn-type]
   30 | }
      | ^