Language: C++

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

typedef struct {
	bool to[8];
} node;

int n,m;
int ans = 0;

void go(int now,int x[8],int cnt) {
	if (cnt == n) {
		ans++;
		return 0;
	}
	for(int i = 0;i < 8;i++) {
		if (x[node[now].to[i]] = false) {
			int y[8];
			for (int j = 0;j < 8;j++) {
				y[j] = x[j];
			}
			y[node[now].to[i]] = true;
			go(node[now].to[i],y,cnt+1);
		}
	}
	return 0;
}

int main() {
	cin >> n >> m;
	node[8];
	for (int i = 0;i < 8;i++) {
		for (int j = 0;j < 8;j++) {
			node[i].to[j] = false;
		}
	}
	for (int i = 0;i < m;i++) {
		int a,b;
		cin >> a >> b;
		node[a-1].to[b-1] = true;
	}
	int start[8] = {false,false,false,false,false,false,false,false};
	go(0,start,0);
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'void go(int, int*, int)':
a.cc:16:24: error: return-statement with a value, in function returning 'void' [-fpermissive]
   16 |                 return 0;
      |                        ^
a.cc:19:27: error: expected primary-expression before '[' token
   19 |                 if (x[node[now].to[i]] = false) {
      |                           ^
a.cc:24:31: error: expected primary-expression before '[' token
   24 |                         y[node[now].to[i]] = true;
      |                               ^
a.cc:25:32: error: expected primary-expression before '[' token
   25 |                         go(node[now].to[i],y,cnt+1);
      |                                ^
a.cc:28:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
   28 |         return 0;
      |                ^
a.cc: In function 'int main()':
a.cc:33:14: error: expected identifier before numeric constant
   33 |         node[8];
      |              ^
a.cc:33:14: error: expected ']' before numeric constant
   33 |         node[8];
      |              ^
      |              ]
a.cc:33:13: error: structured binding declaration cannot have type 'node'
   33 |         node[8];
      |             ^
a.cc:33:13: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:33:13: error: empty structured binding declaration
a.cc:33:16: error: expected initializer before ';' token
   33 |         node[8];
      |                ^
a.cc:36:29: error: structured binding declaration cannot have type 'node'
   36 |                         node[i].to[j] = false;
      |                             ^~~
a.cc:36:29: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:36:32: error: expected initializer before '.' token
   36 |                         node[i].to[j] = false;
      |                                ^
a.cc:36:32: error: expected ';' before '.' token
a.cc:42:23: error: expected ']' before '-' token
   42 |                 node[a-1].to[b-1] = true;
      |                       ^
      |                       ]
a.cc:42:21: error: structured binding declaration cannot have type 'node'
   42 |                 node[a-1].to[b-1] = true;
      |                     ^
a.cc:42:21: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:42:22: error: conflicting declaration 'auto a'
   42 |                 node[a-1].to[b-1] = true;
      |                      ^
a.cc:40:21: note: previous declaration as 'int a'
   40 |                 int a,b;
      |                     ^
a.cc:42:26: error: expected initializer before '.' token
   42 |                 node[a-1].to[b-1] = true;
      |                          ^