0
所以,現在我只是想設置一個簡單的類,並不能找出爲什麼我得到錯誤。這裏是我的頭文件:錯誤:預計標識符
#define Mob
class Mob{
private:
int lvl;
float hp;
public:
Mob(int, float); //Error expected an identifier on the float
};
,並用它
#include "Mob.h"
Mob::Mob(int level, float health) // Error expected an identifier on the int and float
// and an Error: Expected a ; after the)
{
hp = health;
lvl = level;
}
足夠關閉反正。 –