Here is my class:
#include <iostream>
#include "gameobject.h"
#include "IXmlAssigner.h"
#ifndef CHARACTER_H
#define CHARACTER_H
//line 7...
enum Race {HUMAN, DARK_ELF};
enum Gender {MALE, FEMALE};
class Character : public GameEntity, protected IXmlAssigner
{
public:
Character();
Character(std::string xmlCharID);
~Character();
int get_id();
std::string get_name();
Race get_race();
开发者_运维问答 Gender get_gender();
virtual void assign_xml(std::string xmlCharID);
protected:
int char_id;
static int char_count;
std::string name;
Race race;
Gender gender;
};
#endif // CHARACTER_H
On line 7, it states the "multiple types in one declaration" error. Why is this? Is there anything I can do to change it?
#include "gameobject.h"
#include "IXmlAssigner.h"
Most likely you're missing a ;
at the end of a class or structure declaration at the end of one of these headers.
精彩评论