Why are you using 'ItemType' for your lists? Is this some sort of generic container-type object? (Presumably it overloads the '>>' operator, since you were using it in main().) If I were designing the UnsortedType class, I would probably use a template so the object type can be specified when a new instance of the class is defined.
It also seems a bit of a waste the way you store and pass objects, if it's possible, try passing by reference so you don't end up with as much overhead on the stack (since you're going to have to copy the object into the internal array anyway).
John A
Vampirical Lurker
7,630 posts since Apr 2006
Reputation Points: 2,240
Solved Threads: 339
>Right now I keep getting errors when I use the "cin >> item"
Well, then clearly you haven't overloaded the '>>' operator for ItemType.
>What exactly do I have to initialize in the "item.Initialize(????)"
>to get this to work.
You've never posted how ItemType was defined, so can't help you there. Either make due with the current ItemType structure (perhaps modify it if you're allowed), or you're going to have to use a different structure to hold your list nodes, such as an integer.
John A
Vampirical Lurker
7,630 posts since Apr 2006
Reputation Points: 2,240
Solved Threads: 339