开发者

Why am I getting Multiple Types in One Declaration?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜