Mail Archives: djgpp/1998/06/14/20:17:10
From: | Nicolas Blais <eletech AT netrover DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | [Allegro] Datafile problem HELP!
|
Date: | Sun, 14 Jun 1998 18:40:50 -0400
|
Organization: | Elemental Technologies
|
Lines: | 40
|
Message-ID: | <35845170.2FA584AD@netrover.com>
|
NNTP-Posting-Host: | 198.168.87.55
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
PLEASE HELP!
When I load a datafile within my program, it goes fine, but when I try
to access data out of it, it gives me Warning : Ansi C++ forbids
implicit conversion from 'Void *' in argument passing. This warning
appears on every line I try to access some BMP or a midi file in the
example below. I checked my header file created with grabber and it's
fine, so where is the problem below (Please, if you can help,can you
just rewrite the whole code if possible?)
/**************************************************/
DATAFILE *datafile;
datafile = load_datafile("qfpc.dat");
if (!datafile)
{
allegro_exit();
printf("Error loading qfpc.dat!\n\n");
return 1;
}
MIDI * the_music = datafile[Main].dat;
//On line before, Warning: Ansi C++ forbids implicit conversion from
'Void *' in initialisation.
play_midi(the_music, TRUE);
/* BLA BLA BLA*/
/**************************************************/
void show_centered_bmp(char filename[20],int y)
{
BITMAP* bmp;
PALETTE pal;
bmp = load_bmp(filename,pal);
masked_blit(bmp,screen,0,0,(SCREEN_W-bmp->w)/2,y,bmp->w,bmp->h);
destroy_bitmap(bmp);
}
show_centered_bmp(datafile[Title_Main].dat,100);
//On line before, Warning: Ansi C++ forbids implicit conversion from
'Void *' in arguments passing.
/**************************************************/
Thanks, Nicolas Blais
- Raw text -