Intermediate Homework 4 *UPDATED*

The Partridge Family were neither partridges nor a family. Discuss.
User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Intermediate Homework 4 *UPDATED*

Post by chili » December 19th, 2017, 12:57 am

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.
Chili

Post Reply