Hey, I'm a first semester student studying Game Programming. Sadly, my question has absolutely no relation to this, and is more based around something pathetically simple (or at least what I assume is, as it's our first assignment of the semester).
Before I get flamed to death, I'm posting this in the Windows Programming section simply because we have done VERY little ACTUAL C++ yet, and are just getting used to the Visual Studio.NET framework and Windows code. If this is better suited for the C++ (or other) forum, then I apologize in advance, and thank you for any help I can get for this.
------
Basically my problem for the assignment is we're supposed to create two separate structures for a Linked List, which isn't horribly difficult in itself. My problem is I am a bit confused in how to make the lists refer to each other, this is my train of thought (although I'm pretty sure it's not right):
However, a more pressing matter is that we're supposed to ALSO keep all the data in an array at the same time. This is where I'm really having trouble; to put it simply, I have no clue how I'm going to do this.Code:/*::::::::::::::::::::::::::::::::::::::::::::::::: STRUCTURES :::::::::::::::::::::::::::::::::::::::::::::::::*/ ref struct Node { double *vin; char make[255]; char model[255]; int year; char colour[255]; ref struct TechInfo { int cylinder; int horse; int engine; }; struct ListNode * Next; struct ListNode * Prev; };
For one, my method of thinking means that the array will have to hold both integers and char arrays at once.
For two, updating specific areas of the Linked List is troublesome when doing the same with an array.
-------
Here's the actual assignment printout, so you can acquire a better understanding of my problem. Once again, thanks to any of you great code gurus who can help me with this. This isn't a plea for someone to do the assignment for me, just to give me a push in the right direction (or two would be nice).
Originally Posted by Assignment



LinkBack URL
About LinkBacks



