delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/14/15:00:30

From: Nicolas Blais <eletech AT netrover DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: [Allegro] Datafile problem
Date: Sun, 14 Jun 1998 14:49:37 -0400
Organization: Elemental Technologies
Lines: 24
Message-ID: <35841B3F.8B7646B@netrover.com>
NNTP-Posting-Host: 198.168.87.54
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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?

DATAFILE *datafile;
 strcpy(buf, argv[0]);
 strcpy(get_filename(buf), "qfpc.dat");
 datafile = load_datafile(buf);
 if (!datafile)
    {
    allegro_exit();
    printf("Error loading qfpc.dat!\n\n");
    return 1;
    }
the_music = load_midi(datafile[Main].dat);    // Error here.
play_midi(the_music, TRUE);

/* BLA BLA BLA*/

Thanks, Nicolas Blais

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019