how would i go on about adding an item into an array. the catch here, is that instead of adding content normally, i want the added content to be added as a linked list. for example, if i add something into the first slot, and want to add another item similar to the first in the same slot, i would do so implementing a linked list function. i have a linked list header file which will do the adding, but i dont know how to make it work for an array.
any help would be greatly appreciated.
hsquared 0 Newbie Poster
Recommended Answers
Jump to PostYour intent is a little confusing, it sounds like you want to add multiple items to the same element of an array. Which is not directly possible.
You mentioned using a linked list to do this. This would work, but you would need an array of lists. Each element …
Jump to PostYes, you can make an array of any defined data type, whether built-in or user-defined. But you can't create, for example, and array of integers and store more than one integer in an element, if you attempt to do so, you'll simply overwrite the element with the new integer value. …
Jump to PostWhen you use an array's name in combination with the subscript operator '[x]', you have an object that you can interact with.
If we assume that studentTable[10] represents all the "classes" that you teach, studentTable[0] represents one "class", studentTable[1] represents another "class" etc...
What you need to do …
Jump to PostI may be missing something here given the antihistamine I took an hour ago, but since I've never hesitated to sound foolish in the past I shan't be bashful at this point either.
What size is a list and how would the compiler know how much memory to sequester …
All 13 Replies
elsiekins 0 Junior Poster
Fbody 682 Posting Maven Featured Poster
kes166 37 Practically a Master Poster
Fbody 682 Posting Maven Featured Poster
kes166 37 Practically a Master Poster
hsquared 0 Newbie Poster
hsquared 0 Newbie Poster
Fbody 682 Posting Maven Featured Poster
Fbody 682 Posting Maven Featured Poster
hsquared 0 Newbie Poster
Lerner 582 Nearly a Posting Maven
kes166 37 Practically a Master Poster
Fbody 682 Posting Maven Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.