It runs, but sometimes freezes while checking numbers nearby 50, 250, and 450. Even stranger, I input 100, got a glitch; I tried again, and it ran right through. Do I have pointer issues? Math issues? Visual Studio issues?
Code below (I've left line 23 uncommented so you can see where it freezes while running.)
Believe me, I'd love to not be using dynamic allocation like this, but it's part of the assignment.
*(perfects + (*p_count)) = (*i);
This line must be working or else it wouldn't ever return proper output...
Is there some property of declaring new space for something that I'm clearly oblivious of? I'm kind of stumped, it only freezes one in five times with input: 100, but always when input: 1000.