so i am just writing a program to organize a two dimentional array as a deck of cards then cout a random card 5 times. for whatever reason it is giving me odd answers.please let me now where the problem is. thanks...
your card array doesn't have enough elements for the suit. you only asked for one 1.
int a[1] has 1 element, a[0]. there is no a[1];
int a[2] has 2 elements, a[0], a[1]. there is no a[2];
int a[3] has 3 elements, a[0], a[1], a[2]. see where this is going?
the compiler didn't say anything! scary! i guess we are free to read and write to memory outside our program.