Mail Archives: djgpp/1998/06/16/22:35:04
On Sun, 14 Jun 1998 18:40:50 -0400 in comp.os.msdos.djgpp Nicolas
Blais <eletech AT netrover DOT com> wrote:
: 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.
In C++, you must make the conversions explicit, like this:
: MIDI * the_music = datafile[Main].dat;
becomes: MIDI * the_music = (MIDI *)datafile[Main].dat;
: show_centered_bmp(datafile[Title_Main].dat,100);
becomes: show_centred_bmp ((BITMAP *)datafile[Title_Main].dat, 100);
This is mentioned in the Allegro documentation (under "Datafiles"), in
the Allegro file `tools/grabber.txt' which is more detailed
documentation on datafiles, and in Allegro Vivace chapter 10
("Datafiles"), specifically subsection 10.3.1 ("Loading an entire
datafile").
--
george DOT foot AT merton DOT oxford DOT ac DOT uk
xu do tavla fo la lojban -- http://xiron.pc.helsinki.fi/lojban/lojban.html
- Raw text -