Accessing Writing Violation in C Vectors
问题 I'm trying to add a card into my Vect->Items card array, but I'm getting an access writing violation in my add at the Items array address. Is there something wrong with the initialization of the vector? The access writing violation occurs at the address of initialized vector, but I don't understand why it would be an error if it's just initializing. void VectorInit(Vector * vect, int capacity) { vect->size = 0; //initialize the size to 0 (no elements) vect->capacity = capacity; //initialize