www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/05/12/11:15:41

From: arg AT whangomatic DOT freeserve DOT co DOT uk (Andrew R. Gillett)
Newsgroups: comp.os.msdos.djgpp
Subject: Help needed with multiple sources and errors
Date: Wed, 12 May 1999 15:53:20 +0100
Organization: www.release-dates.co.uk
Lines: 61
Message-ID: <MPG.11a3a5ecc3f5324898ab3d@news.freeserve.net>
NNTP-Posting-Host: modem-118.antimony.dialup.pol.co.uk
X-Trace: news6.svr.pol.co.uk 926520802 25928 62.136.25.118 (12 May 1999 14:53:22 GMT)
NNTP-Posting-Date: 12 May 1999 14:53:22 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Newsreader: MicroPlanet Gravity v2.11
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

In my current project, I am using multiple sources for the first time, 
and having a very hard time understanding which bits should go where, and 
how the whole thing should be structured. I'm doing it mostly by trial 
and error, and it seems to have worked so far, but now I am getting a 
huge list of syntax errors in one of my source files which I can't 
explain. Here are the relevant bits of code:


music.h:

class musicsystem_class
{
public:

    JGMOD *my_module;

    void init (void);
    void play (char filename[32]);
    void stop (void);
    void close (void);
};


First part of music.cpp:

#include <stdio.h>
#include <allegro.h>
#include <jgmod.h>

#include "f_alli.h"

#include "global.h"
#include "music.h"


void musicsystem::init (void)
{
...rest of music.cpp


I get a huge list of errors when I try to compile music.cpp, starting 
with:

music.cpp:11: syntax error before '::'

I can't see where this error is. It's not in global.h or f_alli.h, those 
are mostly defines and the other parts of the program compile fine with 
them.


Also, what does the error:

field 'unit' has incomplete type

mean? The line the error refers to is:

class unit_class unit [MAX_UNIT];

-- 
Andrew Gillett      http://argnet.fatal-design.com/     ICQ: See homepage
If the baby won't drink raw milk, boil it.

- Raw text -


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