Arrays are indexed from 0, so the loops should be for(i = 0; i<9; i++) and not for(i = 1; i<10; i++) In your case, you probably override part of the stack, but in general, going out of boundaries results in undefined behavior.
You didn’t find a definitive answer because there isn’t one. It’s up to the author of the program to decide what exit codes they wish to use. Standard C only says that exit(0) or exit(EXIT_SUCCESS) indicate that the program is successful, and that exit(EXIT_FAILURE) indicates an error of some kind. (Returning a value from main is equivalent to calling exit with that value.) Most common …
You have a std::vector called bigDeck and in DealQCard you attempt to access its 0th element, despite the fact it has no elements. Did you mean to put some cards in bigDeck?
Wikipedia has the answer, along with a number of other sources. A segfault basically means you did something bad with pointers. This is probably a segfault: Or this: Or maybe this: Same basic principle in each case – you’re doing something with memory that isn’t yours.