Ok, I've run your original code, I don't know if it's been updated since you first posted. You're right, it crashes when loading from file.
Before I get into it, have you never heard of the standard library? There's the C++ standard library that has things like vector and string that you've reproduced and there's the C standard library that has things like memcpy that you've reproduced. Use of the standard library shows a sophistication in the user; plus, its been tested and it works.
Have you stepped thru each line of your code in a debugger and seen it do what you think it should be doing? If not, you should.
If you did, you'd notice that you're passing your strings by value, thus littering your app with temporary strings. Your string class allocates blocks of memory with vector new, but release with scalar delete.
Why does Bank::add(Account*) modify the account number?
What is the difference between:
|
Bank& Bank::operator=(Bank bank)
|
and
|
Bank& Bank::operator=(const Bank &bank)
|
Once you've answered that, decide what's the effect of misakenly defining the former instead of the latter.
You (mis)used that construct througout your app. Fix it.