Become a part of the TranceAddict community!Frequently Asked Questions - Please read this if you haven'tSearch the forums
TranceAddict Forums > Main Forums > Chill Out Room > Got a question for you programmers out there
  Last Thread   Next Thread
Share
Author
Thread    Post A Reply
Vaedyn
Junior tranceaddict



Registered: Sep 2003
Location: Southbridge, Ma
Got a question for you programmers out there

Alright heres the current dilema. Right now I have an external txt file filled with Employee data(First name, last name, Id, phone number). What I need to do it put this data (As objects) in order of ID on a linked list.

I know how to put it on a linked list...but I can't see to put it on in order. Can anyone help me?


Thanks,

Vaedyn

Old Post Feb-09-2005 02:21  United States
Click Here to See the Profile for Vaedyn Click here to Send Vaedyn a Private Message Add Vaedyn to your buddy list Report this Post Reply w/Quote Edit/Delete Message
tribu
Guest



Registered: Not Yet
Location:
Re: Got a question for you programmers out there

quote:
Originally posted by Vaedyn
Alright heres the current dilema. Right now I have an external txt file filled with Employee data(First name, last name, Id, phone number). What I need to do it put this data (As objects) in order of ID on a linked list.

I know how to put it on a linked list...but I can't see to put it on in order. Can anyone help me?


Thanks,

Vaedyn


When placing each id#, use a loop to place them in order. Sine I dont know what language youre in, Ill try to keep this somewhat general:


You didnt say what order you wanted, so I made it biggest to smallest

DO{

variables:
- CurrentID - The ID youre looking at: Integer?
- CompareID - The ID# youll be comparing

FOR (this counter will count for each item in the list){
If (CurrentId < CompareID) {
Go To next iteration of For Loop
Set Compare ID to the newest ID!
}
Else if (CurrentID > CompareID){
Move everyone from this point of the list down one spot. Current ID, and all its user info gets this newly cleared spot
}
}THIS IS THE END OF THE FOR LOOP

Put anything you want done between checking each ID here


}WHILE theres still text being read from the file.




is this totally crap? I think it would work

Old Post Feb-09-2005 02:30 
Add  to your buddy list Report this Post Reply w/Quote Edit/Delete Message

TranceAddict Forums > Main Forums > Chill Out Room > Got a question for you programmers out there
Post New Thread    Post A Reply

 
Last Thread   Next Thread
Click here to listen to the sample!Pause playbackMinimal/techno! From Ricardo Villalobos live @ Cocoon! #1 [2007] [0]

Click here to listen to the sample!Pause playbackDAR - Choices (M-Zones mix) [2002]

Show Printable Version | Subscribe to this Thread
Forum Jump:

All times are GMT. The time now is 17:20.

Forum Rules:
You may not post new threads
You may not post replies
You may not edit your posts
HTML code is ON
vB code is ON
[IMG] code is ON
 
Search this Thread:

 
Contact Us - return to tranceaddict

Powered by: Trance Music & vBulletin Forums
Copyright ©2000-2026, Jelsoft Enterprises Ltd.
Privacy Statement / DMCA
Support TA!