[NON-Circle] [Off-TopiC] [Theory-Concepts]

From: Baktor Silvanti (baktor@BEDFORD.NET)
Date: 11/22/97


Well, for once, I'm stuck on basics.  I was trying to make a small
program that is mud related that is basically a database system that
will allow me to add/delete/modify anybody offline.  I'm not sure if
there is a utility in the utility folder that does this or not (win95
system here = problems compiling utils) but i wanted to do this as a
side project.  Lets see if anybody can help me with this:

#define PLAYERNUM 100;

struct Arecord {
                int pid;                                //player id number
                int date;                               //date created
                char name[50];                          //player name
                char Clan[50];                          //name of clan
                float level;                            //level of player
                float time;                             //total playing time

struct Arecord player[PLAYERNUM];

. . .

/*  void qsort( void *base, size_t num, size_t width, int (__cdecl
*compare )(const void *elem1, const void *elem2 ) );

//above is MSVC's prototype of qsort...

qsort( (void *)player, PLAYERNUM, (size_t)int, PidSort);


PidSort is a function i wrote that sorts players by id num.  The above
code throws 3 warnings for me:

H:\Msdev\Projects\cd.c(302) : warning C4028: formal parameter 1
different from declaration
H:\Msdev\Projects\cd.c(302) : warning C4028: formal parameter 2
different from declaration
H:\Msdev\Projects\cd.c(302) : warning C4024: 'qsort' : different types
for formal and actual parameter 4
cd.exe - 0 error(s), 3 warning(s)

I've been playing with this for days LITERALLY, i have books and I've
read the damn things, hell, i even copied an example and basically
copied what it did, still same errors. If somebody could show me exactly
what i've messed up, I'd really appreciate it.  Also, when its done,
I'll post the offline util if somebody wants it (hopefully will be good
for win95 machines)

Well, I'm off to bed, i'm tired of staring at it.

Baktor Silvanti

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |

This archive was generated by hypermail 2b30 : 12/08/00 PST