I compiled this code without any problem, the program runs but when I enter a value nothing happens. No error message or anything, the program essentially freezes. I'm thought it might have gotten stuck in the for loop in Flip(n) but that isnt called until the second cout statement and it doesnt even get that far...Any help would be greatly appreciated.
There is your problem. It should be iA < n. I am guessing you originally intended iA != n, but it ended up being a typo. The reason why that loop never terminates is because that assignment is evaluated to a non-zero value, which is taken to be true and hence the loop never terminates.
Bookmarks