Hi guys!I'm in great need and embarassment.I'm new to the C++ program and to be frank I'm having a hard time understanding it. Now our topic is about linked list and my professor gave us this machine problems:

1. Write a program that implements a linked list using an array.Your program should be a menu diven and will prompt the user to insert data,delete data,display the contents of the list,or search the list for a given piece of data. To insert new data, you must delete an element from the available list and then insert into the data list.Conversely,when you delete a node from the data list, you must insert it into the available list.

2. Write a function that merges two ordered linked lists into one list. When two lists are merged, the data in the resulting list are also ordered. The two original lists should be left unchanged; that is, the merged list shoul be a new list.

Moreover, my prof gave me this sample program that will help me solve the problem no 1.

Please help me.I need this by tomorrow...

Recommended Answers

All 3 Replies

>my prof gave me this sample program
If you haven't modified it, then I would suggest you drop that professor and find another that can actually teach you C++.

>Please help me.I need this by tomorrow...
Please show us your attempt. If you need this by tomorrow then that means you've had plenty of time to work on it, so you should have plenty of code and experience to describe what you tried and how it didn't work.

If you haven't modified it, then I would suggest you drop that professor and find another that can actually teach you


What do you mean by this?Is my professor not good enough? Well..I'm really clueless about linked list.She gave this problem just hours ago and I need to submit it by tomorrow..

>What do you mean by this?
I mean that your professor is either incompetent or doesn't care enough to learn C++ properly and thus isn't qualified to teach it.

>Is my professor not good enough?
Well, the code you attached is full of poor programming practices and broken code. If that's an example of your professor's programming ability, I wouldn't expect to get much out of the course.

>Well..I'm really clueless about linked list.
This is still incomplete until I find the time to finish it, but it still covers the basics.

>She gave this problem just hours ago and I need to submit it by tomorrow..
Sorry, but I don't believe you. If you're as new to linked lists as you claim, there's no way you would be expected to completely solve both of those problems in one evening (without cheating, of course).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.