why does this code does not compile?
int substring(char * text, int k, int m, (char *) patterns[]) {
//stuff
// and example return is -1, meaning the sub string was not found
}
I know that the parenthesis in the (char *) is the problem, but I can't seem to figure it out why? I try declaring making patterns as a string in C++ and C but it doesn't compiles.
the error message is "error: expected declaration specifiers or '...' before '(' token" . It's algorithm for my class and my professor gave us that function with those parameters. in addition "patterns is an array of k pointers to \0-terminated strings of length m. I would just like to know why the given function does not compiles even if you just write return -1.