I can’t figure out why it throws an identifier expected error on line 3.
#include <stdlib.h>
void genset(size_t N, size_t parent[static N]) {
parent[N] = N;
}
#define SIZE 10
int main() {
size_t parent[SIZE];
genset(SIZE, parent);
}
I tried compiling with “static” replaced with “size_t” but it still fails with another error.
New contributor
twiglet is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1