I can\'t figure out why I get error for the code below.
The instances of object A will be pushed into a vector (vectorA.push_back(A a)) continu
vector
vectorA.push_back(A a)
My psychic debugging skills tell me that you forgot to implement a copy constructor for A which then results in a double deletion of a Recording when the copy is destroyed.
A
Recording
The growth of the vector would trigger the copy-destroy pairs.