I can't seem to understand why this won't work.
Global variable:
int genericSet[] = {1,2,3,4};
int main()...
int* function() {
return &genericSet;
}
Why would it give me an error while trying to return this array? Is it because it's a global variable, if so why would that matter? How would I normally return a statically declared array? I realize this is extra work returning a global variable, but does it actually prevent this? I just used it as a place holder and kept getting an error.