Language: C++

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

using namespace std;

int H, W;
queue<int, int> Q;
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:
In file included from /usr/include/c++/14/queue:66,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_queue.h: In instantiation of 'class std::queue<int, int>':
a.cc:9:17:   required from here
    9 | queue<int, int> Q;
      |                 ^
/usr/include/c++/14/bits/stl_queue.h:132:67: error: 'int' is not a class, struct, or union type
  132 |       static_assert(is_same<_Tp, typename _Sequence::value_type>::value,
      |                                                                   ^~~~~
/usr/include/c++/14/bits/stl_queue.h:138:57: error: 'int' is not a class, struct, or union type
  138 |       typedef typename  _Sequence::value_type           value_type;
      |                                                         ^~~~~~~~~~
/usr/include/c++/14/bits/stl_queue.h:139:57: error: 'int' is not a class, struct, or union type
  139 |       typedef typename  _Sequence::reference            reference;
      |                                                         ^~~~~~~~~
/usr/include/c++/14/bits/stl_queue.h:140:57: error: 'int' is not a class, struct, or union type
  140 |       typedef typename  _Sequence::const_reference      const_reference;
      |                                                         ^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_queue.h:141:57: error: 'int' is not a class, struct, or union type
  141 |       typedef typename  _Sequence::size_type            size_type;
      |                                                         ^~~~~~~~~
a.cc:13:10: error: expected ',' or ';' before '=' token
   13 | int a(4) = { 0, 1, 0, -1}
      |          ^
a.cc:14:14: error: expected ',' or ';' before '=' token
   14 | int     b(4) = { 1, 0, -1, 0}
      |              ^
a.cc:16:17: error: 'B' has not been declared
   16 | int lake(int A, B,C){
      |                 ^
a.cc:16:19: error: 'C' has not been declared
   16 | int lake(int A, B,C){
      |                   ^
a.cc: In function 'int lake(int, int, int)':
a.cc:17:32: error: 'B' was not declared in this scope
   17 |         if (A < 0 || A >= H || B < 0 || B >= H) {
      |                                ^
a.cc:20:18: error: 'C' was not declared in this scope
   20 |         else if (C == 0) {
      |                  ^
a.cc:22:41: error: invalid types 'int[int]' for array subscript
   22 |                         if (!(lake(A + a[i], B + b[i], C+1))) return flag = false;
      |                                         ^
a.cc:22:51: error: invalid types 'int[int]' for array subscript
   22 |                         if (!(lake(A + a[i], B + b[i], C+1))) return flag = false;
      |                                                   ^
a.cc:25:15: error: expected unqualified-id before '[' token
   25 |         if (s.[A][B] =='#') {
      |               ^
a.cc:25:19: error: 'B' was not declared in this scope
   25 |         if (s.[A][B] =='#') {
      |                   ^
a.cc:26:17: error: 'del' was not declared in this scope
   26 |                 del(A, B);
      |                 ^~~
a.cc:28:35: error: invalid types 'int[int]' for array subscript
   28 |                         lake(A + a[i], B + b[i],C+1);
      |                                   ^
a.cc:28:45: error: invalid types 'int[int]' for array subscript
   28 |                         lake(A + a[i], B + b[i],C+1);
      |                                             ^
a.cc:28:49: error: 'C' was not declared in this scope
   28 |                         lake(A + a[i], B + b[i],C+1);
      |                                                 ^
a.cc: In function 'int del(int, int)':
a.cc:35:1: warning: no return statement in function returning non-void [-Wreturn-type]
   35 | }
      | ^
a.cc: In function 'int main()':
a.cc:46:31: error: expected unqualified-id before '[' token
   46 |                         if (s.[i][j] == '#') lake(i, j, 0);
      |                               ^
a.cc: In function 'int lake(int, int, int)':
a.cc:31:1: warning: control reaches end of non-void function [-Wreturn-type]
   31 | }
      | ^