带有标题保护C++的'class'类型重定义错误

Rim*_*oun 1 c++ error-handling inheritance class redefinition

根据我的理解,标题防护用于避免意外包含多次.但是,当我多次包含一个类时,我仍然会遇到重定义错误.头卫不应该照顾这个吗?//animal.h

#ifndef ANIMAL_H
#define AMIMAL_H

class Animal {};

#endif
Run Code Online (Sandbox Code Playgroud)

//main.cpp

#include"animal.h"
#include"animal.h"
Run Code Online (Sandbox Code Playgroud)

错误C2011:'动物':'类'类型重新定义

Bil*_*nch 6

#ifndef ANIMAL_H
#define AMIMAL_H
         ^
Run Code Online (Sandbox Code Playgroud)

那些都不是ANIMAL_H.