I have an error called Unexpected Token 'class', did you forget a ;? I have no clue what is going on. Maybe you guys can help me out. The codes name is Player.h. The error is on line 9.

#ifndef PLAYER_H
#define PLAYER_H

#include "Weapon.h"
#include "Armor.h"
#include "Monster.h"
#include <string>

class Player
    void createClass(); 
    int getArmor(); 
    bool isDead(); 

    void goToArena(); 
    void store();
    void rest(); 
    void viewStats(); 
    void loseMoney(int cost); 
    void buyWeapon(const std::string& name, int lowDamage, int highDamage); 
    void buyArmor(const std::string& name, int protection);
    bool attack(Monster& monster); 
    void takeDamage(int damage); 
    void victory(int xp, int gold); 
    void levelUp(); 
    void gameover(); 
    void displayHitPoints(); 

    std::string mName; 
    std::string mClassName; 
    int         mExperiancePoints; 
    int         mNextLevelExp;
    int         mHealthPoints; 
    int         mMaxHealthPoints; 
    int         mLevel; 
    int         mAccuracy; 
    int         mGold; 
    Weapon      mWeapon; 
    Armor       mArmor; 


In this case, the error is most likely in one of the header files you are including, with the most probably cause being that you omitted a semi-colon at the end of a class definition.

This question has already been answered. Start a new discussion instead.