Article View: csu.cs.200
Article #181Re: help with output of name, salary, and age.
From: Adam Carheden
Date: Thu, 17 Sep 1998 00:00
Date: Thu, 17 Sep 1998 00:00
18 lines
1291 bytes
1291 bytes
I figured this out about about midnight last night after much frustration. First, NO, it's not okay to have a third list. I have two print functions, one for the unsorted lists and another for the sorted lists. The unsorted prints has 4 columns, printing the lists separately as Name, Age, Name Salary. Chuck said this was okay. The sorted print tests to see if the names are the same (strcmp()) before printing. If it is, it prints all fields, if it's not, it prints only the name greater in the alphabet and it's corresponding age/salary field. It then increments only the pointer of the node that it printed. Hope this helps. -- Adam carheden@holly.colostate.edu http://holly.ColoState.edu/~carheden
Technical Details
Message-ID:
<3601531E.4791ACFD@holly.colostate.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6trao8$2afo@yuma.ACNS.ColoState.EDU>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 127144,d7ac8218595a0ce X-Google-Attributes: gid127144,public From: Adam Carheden <carheden@holly.colostate.edu> Subject: Re: help with output of name, salary, and age. Date: 1998/09/17 Message-ID: <3601531E.4791ACFD@holly.colostate.edu> X-Deja-AN: 392132301 Content-Transfer-Encoding: 7bit References: <6trao8$2afo@yuma.ACNS.ColoState.EDU> Content-Type: text/plain; charset=us-ascii Organization: Colorado State University, Fort Collins, CO 80523 Mime-Version: 1.0 Newsgroups: csu.cs.200