Page 2 of 2

Re: Intermediate Homework 4 *UPDATED*

Posted: December 19th, 2017, 12:57 am
by chili
The code you got there looks fine. Of course as papa says the new/delete for db is not necessary. In general we only do that when we have a definite reason to do so. I think I show doing new Database in tutorial 5 just as an example of newing a single object, but I also say in that same video that we wouldn't want to actually do so and I revert it.

The other thing is, I believe in the assignment the database we create stores int data and string data, but you're only storing string data, so you're not getting the practice with things like reinterpreting pointers/reading binary data into memory.