Language: C++

#include <iostream>
using namespace std;

const nmax = 8;
bool graph[nmax][nmax];

int dfs(int v, int N, bool visited[nmax]) {

    bool all_visited = true;

    for (int i = 0; i < N; i++) {
        if (visited[i] == false) all_visited = false;
    }

    if (all_visited) return 1;

    int ret = 0;

    for (int i = 0; i < N; i++) {
        if (graph[v][i] == false) continue;
        if (visited[i]) continue:

        visited[i] = true;
        ret += dfs(i, N, visited);
        visited[i] = false;
    }

    return ret;
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    int N, M; cin >> N >> M;

    for (int i = 0; i < M; i++) {
        int A, B; cin >> A >> b;
        graph[A-1][B-1] = graph[B-1][A-1] = true;
    }

    bool visited[nmax];
    visited[0] = true;
    cout << dfs(0, N, visited) << endl;
}

Compiler output:
a.cc:4:7: error: 'nmax' does not name a type
    4 | const nmax = 8;
      |       ^~~~
a.cc:5:12: error: 'nmax' was not declared in this scope
    5 | bool graph[nmax][nmax];
      |            ^~~~
a.cc:5:18: error: 'nmax' was not declared in this scope
    5 | bool graph[nmax][nmax];
      |                  ^~~~
a.cc:7:36: error: 'nmax' was not declared in this scope
    7 | int dfs(int v, int N, bool visited[nmax]) {
      |                                    ^~~~
a.cc: In function 'int dfs(...)':
a.cc:11:25: error: 'N' was not declared in this scope
   11 |     for (int i = 0; i < N; i++) {
      |                         ^
a.cc:12:13: error: 'visited' was not declared in this scope; did you mean 'all_visited'?
   12 |         if (visited[i] == false) all_visited = false;
      |             ^~~~~~~
      |             all_visited
a.cc:19:25: error: 'N' was not declared in this scope
   19 |     for (int i = 0; i < N; i++) {
      |                         ^
a.cc:20:13: error: 'graph' was not declared in this scope; did you mean 'isgraph'?
   20 |         if (graph[v][i] == false) continue;
      |             ^~~~~
      |             isgraph
a.cc:20:19: error: 'v' was not declared in this scope
   20 |         if (graph[v][i] == false) continue;
      |                   ^
a.cc:21:13: error: 'visited' was not declared in this scope; did you mean 'all_visited'?
   21 |         if (visited[i]) continue:
      |             ^~~~~~~
      |             all_visited
a.cc:21:33: error: expected ';' before ':' token
   21 |         if (visited[i]) continue:
      |                                 ^
      |                                 ;
a.cc:21:33: error: expected primary-expression before ':' token
a.cc:24:26: error: 'visited' was not declared in this scope; did you mean 'all_visited'?
   24 |         ret += dfs(i, N, visited);
      |                          ^~~~~~~
      |                          all_visited
a.cc: In function 'int main()':
a.cc:38:31: error: 'b' was not declared in this scope
   38 |         int A, B; cin >> A >> b;
      |                               ^
a.cc:39:9: error: 'graph' was not declared in this scope; did you mean 'isgraph'?
   39 |         graph[A-1][B-1] = graph[B-1][A-1] = true;
      |         ^~~~~
      |         isgraph
a.cc:42:18: error: 'nmax' was not declared in this scope
   42 |     bool visited[nmax];
      |                  ^~~~
a.cc:43:5: error: 'visited' was not declared in this scope
   43 |     visited[0] = true;
      |     ^~~~~~~