gift.cpp:12:35: error: expected ',' or '...' before 'a'
12 | int construct(int n, int r, int[] a, int[] b, int[] x) {
| ^
gift.cpp: In function 'int construct(int, int, int*)':
gift.cpp:13:9: error: 'x' was not declared in this scope
13 | if (x[0] == 1)
| ^
gift.cpp:14:15: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
14 | craft(string(n, 'R'));
| ^~~~~~~~~~~~~~
In file included from gift.cpp:2:
gift.h:5:25: note: initializing argument 1 of 'void craft(std::string&)'
5 | void craft(std::string &s);
| ~~~~~~~~~~~~~^