I don't understand that part you added to your post... I eliminated the possibility of rand() duplicating cards in the deck by erasing each index rand() selected from the deck. The range for rand() each time is changed because it gets the new size of the deck (after the previous rindex was erased). At the end, the deck vector is assigned the value of the shuffled vector. This has been working for me so far; no crashes.
Does your way of doing it have something to do with more deep working of C++, and my way will lead to future issues that aren't apparent to me? Because as of now, it works.