GIDForums  

Go Back   GIDForums > Computer Programming Forums > C Programming Language
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 13-Apr-2004, 11:10
fj8283888 fj8283888 is offline
Junior Member
 
Join Date: Apr 2004
Posts: 37
fj8283888 is on a distinguished road
Exclamation

sorting question


cc -o driver driver.c test.o
------------they are in test.c-------------------------------
CPP / C++ / C Code:
void sort_list(IORB **list, int (*newpr)(short)) 
{ 
} 

int newp(short base) 
{ 
return base; 
} 

-------------they are in drive.c-----------------------------
IORB *L;
sort_list(&L,newp);

I would like to know:
1. How to insert the value to newp?
2. How can I do the sorting in sort_list() function?

the structure is following:
CPP / C++ / C Code:
typedef struct iorb{ 
short base_num; 
struct iorb *link; 
char filler[110]; 
}IORB;
Last edited by dsmith : 13-Apr-2004 at 18:06.
  #2  
Old 13-Apr-2004, 21:42
dsmith's Avatar
dsmith dsmith is offline
Senior Member
 
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
dsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of light
Hi fj8283888. I hope that isn't your real name

I am struggling a bit understanding what you are asking here.

1. How to insert the value to newp?
Can you explain what you mean here?

2. How can I do the sorting in sort_list() function?
Are you asking how to cod the sort_list() function? Do you want just a linear sort or are you looking for some fancy large data sort? Or is this an insert sort? What is the comparison data?

Sorry to answer your question with more questions, but I am not sure what exactly you need. If you post back with some more details, someone here may be able to help you.

Cheers,
d
 
 

Recent GIDBlogToyota - 2008 November Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A question about message forums... Straga Free Web Hosting 2 07-Apr-2004 05:54
question of practice magiccreative C++ Forum 1 06-Feb-2004 08:17
a C input question.. tmike C Programming Language 2 19-Sep-2003 03:39
a C input question tmike C Programming Language 1 16-Sep-2003 03:31
a noobish compiler question Charunks C++ Forum 5 03-Sep-2003 03:18

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 04:58.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.