Main.c:7:1: error: unknown type name 'bool'
7 | bool next_permutation(int *arr, int n) {
| ^~~~
Main.c:1:1: note: 'bool' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
+++ |+#include <stdbool.h>
1 | void swap(int *a, int *b) {
Main.c: In function 'next_permutation':
Main.c:13:16: error: 'false' undeclared (first use in this function)
13 | return false;
| ^~~~~
Main.c:13:16: note: 'false' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
Main.c:13:16: note: each undeclared identifier is reported only once for each function it appears in
Main.c:27:12: error: 'true' undeclared (first use in this function)
27 | return true;
| ^~~~
Main.c:27:12: note: 'true' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
Main.c: In function 'main':
Main.c:40:13: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
40 | printf("%d %d %d
", abc, def, ghi);
| ^~~~~~
Main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
+++ |+#include <stdio.h>
1 | void swap(int *a, int *b) {
Main.c:40:13: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
40 | printf("%d %d %d
", abc, def, ghi);
| ^~~~~~
Main.c:40:13: note: include '<stdio.h>' or provide a declaration of 'printf'
Main.c:45:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
45 | printf("Total solutions: %d
", count);
| ^~~~~~
Main.c:45:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Main.c: In function 'next_permutation':
Main.c:28:1: warning: control reaches end of non-void function [-Wreturn-type]
28 | }
| ^