0

I need help in making a linked list of vehicle structs

Just like the title suggests, I need help on making a linked list of vehicle structs. Nothing that I'm able to find can actually help me nor can I understand what they're doing. Desperately need this for a college project

22nd Dec 2019, 10:48 PM
Juan Carlos Ong
Juan Carlos Ong - avatar
2 Réponses
+ 1
This is how they want me to do it: - Each vehicle should have a Make, Model, Registration Number, Mileage/Km’s and Number of previous owners. - Once a vehicle is bought or sold, the user should be able to add/insert or delete a vehicle as necessary and then print out a full list of remaining available vehicles in stock. - Vehicle struct details such as a Make, Model, Registration Number, Mileage and previous owners should be pointers to memory which you allocate via malloc - Requests to enter data for each new candidate should be in an “insert” function rather than the main program (unlike the linked list example on moodle) and deletion should be using a “delete” function. Printing the list should be using a print function. - Vehicles should be inserted in alphabetical order of the first letter of their model. Therefore, a separate function called from within the “insert” function should check for this and return whether the newly inserted candidate should go before or after the current link. (i.e. Civics should be printed out before Golfs)
22nd Dec 2019, 11:41 PM
Juan Carlos Ong
Juan Carlos Ong - avatar
0
Yeah, a list of vehicles. I'll send the actual thing they want me to do
22nd Dec 2019, 11:39 PM
Juan Carlos Ong
Juan Carlos Ong - avatar