Can you send me the source so I can look it up for you, put it on pastebin or something like that
If we have a programming help thread going, I'm currently learning C# with my school. And my friend challenged me to make a card shuffler. I've got my array set up with all the values the cards can take up and I'm just trying to set it up so that two cards are swapped and it iterates through that 100 times, then processes the output. But silly ol' me messed up a little bit and it repeats the same cards over and over 100 times :3
Help pl0x?
I see why it creates an infinite loop cause this here "if(compTotal <15){
should be made so it only allows it to run 1 time but instead the comTotal variable stays smaller then 15 so the hit keeps increasing, next is never executed cause hit keeps increasing, maybe add
while(compTotal <15){
dunno something like that should work or else figure out yourself ( I'm still learning c++ so excuse me if I make mistakes)
Edit: if this is not fixed by the weekend I will compile it and then try to fix it
EDIT EDIT:
for lolzy, try to swap them all at the same time it works much more efficient, there is no need to swap them 2 by 2, just use the vector and an iterator for it
Can you put your code into void functions please it's much better to understand then (just a tip) also I can't see what it wrong now with it and I'm glad that the while loop worked