Original Post
For my program, I need to make a global array based on input - this is the basic idea: int x[N]; int main() { int N; cin >> N; } and I need to size an integer based on input: int main() { int N; cin >> N; if(N < 1000) long int x; else int x; } but of course that doesn't work, it just give me a "x undeclared" error