| | |
Linked List problem
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2007
Posts: 2
Reputation:
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.
New members chased away this month: 3
![]() |
Similar Threads
- 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
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete deploy developer display dll dynamiccharacterarray email encryption error file format forms fstream function functions game generator givemetehcodez graph homeworkhelp iamthwee ifstream image input int java lib list loop looping loops map math matrix memory multiple newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg simple sorting spoonfeeding string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






