The following code works fine when it's run but there's an issue when it's run in debug mode using Eclipse, it does not wait for input and instead just keeps going and some seemingly random value is printed to the console. It also won't stop at a breakpoint.
int main() {
int N, Q, maxSize;
cout <<"Enter a number"<<endl;
int test;
cin >> test;
cout << test <<endl;
}