•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 402,965 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,605 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 711 | Replies: 1
![]() |
•
•
Join Date: Sep 2007
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
If I were to write the code for some functions in a 2 dimensional linked list called get_data that finds the data stored in specified row and column and upon successful data retrieval, it returns true or else return false. And the given prototype is:
... How do I find data stored in a two dimensional linked list?
template <class T>
bool get_data(int row, int col, T & data) ... How do I find data stored in a two dimensional linked list?
>How do I find data stored in a two dimensional linked list?
Is this a hypothetical question, or do you really have to write such a function? My first inclination would be to count from 0 to row while traversing the outer list, then jumping into the inner list of the node that I stopped on, and do the same thing. I'd return the data I found there, or an error if either of those traversals took me to the end of the list.
Is this a hypothetical question, or do you really have to write such a function? My first inclination would be to count from 0 to row while traversing the outer list, then jumping into the inner list of the node that I stopped on, and do the same thing. I'd return the data I found there, or an error if either of those traversals took me to the end of the list.
I'm a programmer. My attitude starts with arrogance, holds steady at condescension, and ends with hostility. Get used to it.
![]() |
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- linked list problem!!! (C)
- Doubly Linked List Problem (C++)
- Linked list (C++)
- Linked List problem (C)
- The C++ LINKED LIST (C++)
- remove method linked list (C)
- Linked List & Objects (C++)
- printing a linked list (C++)
- Linked List using pointers (C++ ADT) (C++)
- Cannot figure out how to implement linked list and rbtree for a project! (Java)
Other Threads in the C++ Forum
- Previous Thread: tenis match pseudo
- Next Thread: Uninitialized Local Variable help



Linear Mode