Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Vector manipulating problem

Status
Not open for further replies.

Skabumba

Programmer
Sep 1, 2004
3
US
I am having problem comparing objects in vectors and adding new ones, without dupe data.

For example..
3 dates with data as object in order in a vector.
I need to add the missing dates with the data from the previous date(but adding a day to the date)

Im using a while loop, getting the current and future with (object)Vector.get( index)...
new object = old data
Vector.inset(new object)

end while
but im getting dupe data and wrong data when trying to do something simple
Thanks
 
I don't understand the question, but just a tip.

By comparing objects you're not comparing the contents of the object (ie the date) but the objects themselves (if they reference the same memory area).

Cheers.

Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top