![]() |
2 dimensional linked list
1 Attachment(s)
Hi Friends,
Can you please help me write 3 functions in C++. It's based on a 2 dimensional linked-list The 3 functions that i have left to write are: 1.get_data: If data retrieval is successful return true otherwise return false. 2. update_data: This function updates the data located in the specified row and column of the linked list and above, returns true if data update is successful and returns false otherwise. 3. remove_data: This function removes a node located in the specified row and column from the linked list. If the node does not exist then return false other wise remove the node and return true. Attached is the project that i have managed to complete with the help of my tutor. Can any one help me please, this will give me a bonus 5% in my course work. Thank you. |
Re: 2 dimensional linked list
Why should you get the bonus if we write the code for you?
I'm not opening an attachment - it might contain anything. What exactly is the problem you're struggling with at the moment? |
Re: 2 dimensional linked list
2 Attachment(s)
finally......i got the programme to work.......but not sure if it is correct......can i get some help now?
please the required functions is in driver.cpp |
Re: 2 dimensional linked list
I'm still not going to open an attachment. Post code using code tags (described in the posting guidelines).
If the program works why aren't you sure if it's correct? What's wrong with it, and if there's something wrong, why do you think that means it works? |
Re: 2 dimensional linked list
I'm not sure if it is working...though it compiles and runs.
I just want to know if what I have done is correct. Here is the code that I've written: Code:
template <class T> |
Re: 2 dimensional linked list
Believe it or not, usually the way to determine if code is correct is to run it in a suitable testbed. It's way too easy to miss something just by reading the code.
So I suggest you create a testbed to exercise this code. So create a new 2d list, add some items, display the list in such a way as you can check that something is wrong, for example if you enter an item at (5,10) and it displays at (10,5) then you've got an x-y transposition bug somewhere. Cos that's what I would have to do to verify your code, and it doesn't really help much for me to do that; you may as well do it. If you've written the above code then you should have the skills to create a suitable testbed for it. |
Re: 2 dimensional linked list
hi ..
Interesting code, goode luke |
| All times are GMT +5.5. The time now is 06:39. |