neowin_hipster Posted June 26, 2004 Share Posted June 26, 2004 (edited) Just confused about this. Does this mean that instead of being reference based, you insert ints, doubles, etc. edit: i think what was meant was that it was array based. Edited June 26, 2004 by Goalie_CA Link to comment Share on other sites More sharing options...
0 azcodemonkey Posted June 27, 2004 Share Posted June 27, 2004 Hmmm... isn't an abstract data type just a definition or interface? I would guess that a cdt is an explicit implementation of that interface. Just a guess, though. I think it has little to do with reference/value types. Maybe I'm not fully understanding your question... it's late. :) Link to comment Share on other sites More sharing options...
0 OPaul Posted June 27, 2004 Share Posted June 27, 2004 A linked list uses pointers in a "node" to point to the next data value. Link to comment Share on other sites More sharing options...
0 STV Posted June 27, 2004 Share Posted June 27, 2004 an abstract data type is just the declaration part of the class. plain and simple. if you want to do "information hiding" with your source code, this is a good way to approach it. place your declaration (ADT) in a .h file and your implementation of those funtions (or can they be called methods in this case?) and other items relating to that class in a .cpp file (assuming that you are talking about C++). to create a linked list you should create a struct that represents a node (can be seen as an element of this linked list) first. the node will contain a pointer to another node and an "info" variable. it is best to use templates when creating linked list because it will allow you to use many types. the linked list class, itself, generally (for single linked list) has: - pointer pointing to the first node - pointer pointing to the last node - int that holds the length of the list - etc Im not really sure what your originaly question was because you seem to have edited it. oh well, if you need more help, just ask. hope this helps, STV Link to comment Share on other sites More sharing options...
0 Glowstick Posted June 27, 2004 Share Posted June 27, 2004 When I was in the university some time ago, linked list fell under ADTs. Link to comment Share on other sites More sharing options...
0 STV Posted June 27, 2004 Share Posted June 27, 2004 When I was in the university some time ago, linked list fell under ADTs. that is how they teach it and choose to structure the course because it allows students to grasp the concepts better, i guess. STV Link to comment Share on other sites More sharing options...
Question
neowin_hipster
Just confused about this.
Does this mean that instead of being reference based, you insert ints, doubles, etc.
edit: i think what was meant was that it was array based.
Edited by Goalie_CALink to comment
Share on other sites
5 answers to this question
Recommended Posts