OT - Need help debugging header file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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...


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux