This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
OT - Need help debugging header file
- From: Michael Sullivan <michael at espersunited dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 12 Nov 2007 15:56:47 -0600
- Subject: OT - Need help debugging header file
I swear this worked yesterday, and I haven't altered it since then. I
cannot see what's wrong with this code:
In file included from character.c:5:
character.h:9: error: expected identifier or '(' before 'int'
character.h:10: warning: no semicolon at end of struct or union
make: *** [character] Error 1
michael@camille ourrpg $ nl character.h
1 /*character.h - Header file for the character struct and
function prototypes*/
2 #ifndef __CHARACTER_H__
3 #define __CHARACTER_H__
4
5 typedef struct
6 {
7 char *name;
8 unsigned long currentHP, maxHP, currentMP, maxMP;
9 int xPos, int yPos;
10 } character;
11
12 void printStats(character* c);
13 character createCharacter(char* name, long maxHP, long maxMP);
14 character scanCharacter(void);
15
16 #endif
The semicolon is there at the end of the typedef, and I don't see
anything that would remotely require a ( up there on line nine...