473,382 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

linked lists

1
can anyone help me in this linked list please
am bit confused

1. get_data: This function finds the data stored in the specified row and column of a 2
dimensional linked list. If data retrieval was successful return true otherwise return
false. The prototype is given below:

template <class T>
bool get_data(int row, int col, T& data);
template <class T>
bool linkedlist_2d<T>::get_data(int row, int col, T & data){
bool bsuccess;

???????????????

return bsuccess;
}




2. update_data: This function updates the data located in the specified row and column of
a 2 dimensional linked list. As above, return true if data update is successful and return
false otherwise. The prototype is given below. Note that const argument indicates that
the value will not change inside the function. This is a good programming practice.
template <class T>
bool update_data(int row, int col, const T data);

template <class T>
bool linkedlist_2d<T>::update_data(int row, int col, const T data){
bool bsuccess;

??????????????

return bsuccess;
}




3. insert_data: This function inserts a data within the existing locations of a 2
dimensional linked list. For example, if your linked list has 2 rows with 3 columns in
the first row and 4 columns in the second row then this function should return false if
user wants to fill data in 2nd row and 5th column. The prototype is given below:
template <class T>
bool insert_data(int row, int col, const T data);

i have done all the other functions except this one's
i don't know how to complete
help please

template <class T>
bool linkedlist_2d<T>::insert_data(int row, int col, const T data){
bool bsuccess;

?????????????

return bsuccess;
}
Sep 29 '07 #1
1 1312
Ganon11
3,652 Expert 2GB
Can we see what you've got for your insert_data function so far?
Sep 29 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Chris Ritchey | last post by:
Hmmm I might scare people away from this one just by the title, or draw people in with a chalange :) I'm writting this program in c++, however I'm using char* instead of the string class, I am...
10
by: Kent | last post by:
Hi! I want to store data (of enemys in a game) as a linked list, each node will look something like the following: struct node { double x,y; // x and y position coordinates struct enemy...
1
by: Booser | last post by:
// Merge sort using circular linked list // By Jason Hall <booser108@yahoo.com> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <math.h> //#define debug
12
by: Jonathan Bartlett | last post by:
Just finished a new IBM DeveloperWorks article on linked lists, and thought you all might be interested. It's not an introduction -- it instead covers some of the more interesting aspects of...
3
by: s_subbarayan | last post by:
Dear all, 1)In one of our implementation for an application we are supposed to collate two linked lists.The actual problem is like this: There are two singularly linked lists, the final output...
4
by: MJ | last post by:
Hi I have written a prog for reversing a linked list I have used globle pointer Can any one tell me how I can modify this prog so that I dont have to use extra pointer Head1. When I reverse a LL...
3
by: Little | last post by:
Could someone tell me what I am doing wrong here about declaring mutiple double linked lists. This is what the information is for the project and the code wil be below that. Thank your soo much for...
12
by: joshd | last post by:
Hello, Im sorry if this question has been asked before, but I did search before posting and couldnt find an answer to my problem. I have two classes each with corresponding linked lists, list1...
19
by: Dongsheng Ruan | last post by:
with a cell class like this: #!/usr/bin/python import sys class Cell: def __init__( self, data, next=None ): self.data = data
51
by: Joerg Schoen | last post by:
Hi folks! Everyone knows how to sort arrays (e. g. quicksort, heapsort etc.) For linked lists, mergesort is the typical choice. While I was looking for a optimized implementation of mergesort...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.